View Full Version : MySQL starting problem

23rd April 2007, 12:08
hii friends,

i have freshly installed Fedora Core-6. with that MySql is installed bydefault. The version of mysql is 5.0.22
now whenever i try to start mysql from the terminal by typing "mysql" it shows the following error :

Error 2002 [HY000] : Cant connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

i've checked this directory /var/lib/mysql/
and there is no such file called mysql.sock

by typing the command "/etc/init.d/mysqld status" on the shell it returns -->
mysqld stopped

and by typing the command "/etc/init.d/mysqld start" on the shell the following is shown on the terminal :

Initializing MySQL database : Neither host 'root' nor 'localhost' could be looked up with /usr/bin/resolveip'. Please configure the 'hostname' command to return a correct hostname. If yoiu want to solve this at a later stage restart this script with --force option

i think the mysql service is not started bydefault when the OS starts and i have to configure the hostname etc. but i dont know how to do so. also the mysql.sock file is not getting created.

please suggest a possible solution.

Diego Schulz
23rd April 2007, 13:58
maybe you can edit the file /etc/hostname using your favorite text editor, usually one can set the hostname by editing this file

23rd April 2007, 14:07
what exactly should i write in that file??

24th April 2007, 13:55
I guess this problem is solved now by changing /etc/hosts to include an entry with localhost, right?

24th April 2007, 17:53
edit....you solved it!

25th April 2007, 07:20
Thankyou all for the help

this problem is now solved.