LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL and FEDORA (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-and-fedora-802272/)

Rocio911 04-15-2010 04:23 PM

MySQL and FEDORA
 
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,

Tinkster 04-15-2010 04:34 PM

Hi, welcome to LQ!

First, check which packages related to MySQL you installed:
Code:

rpm -qa | grep -i mysql

TB0ne 04-15-2010 04:56 PM

Quote:

Originally Posted by Rocio911 (Post 3936926)
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,

I'd suggest making sure that MySQL is running first. Do a "ps -ef | grep mysql", to see if anything is there. If not, as root, type in "/etc/init.d/mysql start"

chrism01 04-15-2010 06:40 PM

Also, I think you meant

mysql -u root -p

not -s

John VV 04-15-2010 07:23 PM

Rocio911
1) how did you install mysql ? from yum and using the fedora rpm? or the mysql bin from the mysql web site?
2) have you set up a root account ??? ( i use phpMyAdmin)
3) is mysql running ? and is it a start up daemon or what ?

4) also fedora 11 is about to hit it's END OF LIFE in just over a month
so in about 60 days or less -- there will NEVER be any updates to fedora 11 ever .



please install the current fedora 12 or in about a month install fedora 13.

cola 04-16-2010 07:22 AM

Quote:

Originally Posted by Rocio911 (Post 3936926)
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,

Post:
Code:

rpm -qa | grep mysql
ps aux | grep mysql
mysql -u root -p


cola 04-16-2010 07:24 AM

Quote:

Originally Posted by Rocio911 (Post 3936926)
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,

To restart mysqld daemon:
Code:

su
password:
service mysqld restart

or
Code:

/etc/init.d/mysqld restart


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