Can't connect to mysql?

fvsfvs
edited May 2006 in Internet & Media
Need some help getting started with mysql, My operating system is Fedore core 5 and I'm
new at it. Well after down loading mysql, tried to sart it on terminal as root and used these commands mysql -u root -p that got me this error message;
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2)
Then tried this mysqld_safe & and then
[1] 7100
[root@localhost soranno]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
060501 16:08:37 mysqld ended


[1]+ Done mysqld_safe
Where do I go from here?:banghead:

Comments

  • edited May 2006
    run mysql_install_db --user=mysql if you havent already, then make sure the mysql.sock file is actually in the location the client is looking for. you can change that in the my.cnf file. post back and see if this helps... there are more routes to take after these steps.
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited May 2006
    were you sure that mysqld was started? Did you install the RPM version or compile it? If you used rpm, try this to start.

    as root:
    /sbin/service mysqld start

    Then try connecting again.
  • edited May 2006
    good point shwaip, it would start differently depending on installation method. it looks like his instance is crashing immediately though. a glimpse into the err file would be nice as well....
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited May 2006
    He started by trying
    mysql -u root -p
    If mysqld wasn't running, then it would give the first error he got. Dunno why he had the problem with mysqld_safe though.
  • edited May 2006
    i've seen that error before, because the tables weren't initialized.... that's why i told him to run mysql_install_db to get the mysql tables there if they didnt already exist. in my experience that's been the major cause of mysql_safe bombing out like that.... but like i said a glimpse into the err file would really be a major help.
Sign In or Register to comment.