LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   mysql error (https://www.linuxquestions.org/questions/fedora-35/mysql-error-491487/)

Parthava 10-11-2006 12:23 PM

mysql error
 
Hi,
I have Fedora Core 5 installed on my computer with dual OP Windows XP. Yesterday, I was trying to use MySQL, so I put mysql command on the terminal and it gives me the following error:

ERROR 2002 (HY000): Can't connect to local MySQL Server through Socket '/var/lib/mysql/mysql.sock' (2)

is somebody can help me to figure out?

acid_kewpie 10-11-2006 12:45 PM

$10 says you've not started the mysql service.

b0uncer 10-11-2006 12:58 PM

Code:

service mysql start
or
Code:

/etc/init.d/mysql start
I recall either of those should work..basically they're the same. But if you want mysql to run every time you boot, you'll have to alter your runlevel config.

babysparrow 10-11-2006 03:15 PM

b0uncer : don't you mean service mysqld (with a 'd')?

I'm running FC5 and mysql isn't a recognised service.

(FYI).

Parthava 10-12-2006 10:26 AM

same mysql error
 
I tried both,
Code:

service mysql start
and

Code:

/etc/init.d/mysql start
unfortunately it didn't work and it gives me the same error. Do you mean
Quote:

mysqld
instead of
Quote:

mysql
? What is the difference between mysql and mysqld?

babysparrow 10-13-2006 06:50 PM

OK.

Try this :
Quote:

/etc/rc.d/init.d/mysqld start
If this does not work, what error is it giving ?

Try :
Quote:

ps -ef | grep mysqld
What do you get ?

jschiwal 10-13-2006 07:06 PM

Look for /usr/share/doc/packages/mysql/manual.pdf or /usr/share/doc/packages/mysql/manual.ps. There are a few things that you need to do after installing mysql to secure it. The manual also has trouble shooting information.

After starting the service you will want to use mysqladmin to give yourself the priviledges you need. Later, you will normally start mysql like:
mysql -u username -p
<password>

Good Luck.

babysparrow 10-13-2006 07:12 PM

jschiwal : I think parthava has not got the mysqld to start , so he won't be able to use the admin tools yet. Unless we've got past this point
Quote:

ERROR 2002 (HY000): Can't connect to local MySQL Server through Socket '/var/lib/mysql/mysql.sock' (2)

jschiwal 10-14-2006 06:54 AM

I guess I was jumping ahead a bit. His syntax to start the MySQL monitor didn't look quite right.

He could try (for testing purposes) starting mysql with the command "sudo -u mysql /usr/bin/mysql_safe &"

And then run "mysqladmin -u root -p <rootpassword> status" to verify whether it started or not.
sudo /sbin/chkconfig -l mysql will list the runlevels that mysql should run under. He could use this command to automatically start the server when he boots the machine, assuming the service will start.

Parthava 10-16-2006 03:52 PM

Hi The problem has been fixed. I went to /etc/rc.d/init.d/ and then as a root user, I gave the command
Quote:

./mysqld start
and that's how I started the daemon. Thank you very much for all your help. I really appreciate it. Thanks to linux community.

acid_kewpie 10-16-2006 04:00 PM

no suprise there then... it's *always* that, as you would have seen had you scrolled to the bottom of the page to see all the identical threads.

sohailark 10-17-2006 04:28 AM

i have found a web site for learning mysql, and want to share it with this cummunity web site address is
http://adminschoice.sytes.net


All times are GMT -5. The time now is 09:09 PM.