You are not logged in.
Pages: 1
I have this error when I try to login as root (I have just installed MySQL with pacman):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
I searched @ google and I found thousands of posts with this problem. I followed 2 ways to solve it but I can't.
If anyone can help...!
Thanks
~k3rn31
Offline
is mysql running?
/etc/rc.d/mysqld start
Offline
Yeap.
/etc/rc.d/mysqld start
:: Starting MySQL [DONE]
I re-type the command to login: (mysql -u root -p)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
~k3rn31
Offline
try netstat -v | grep mysql
and check the path to mysql.sock
Offline
grep socket /etc/my.cnf
make sure the path's that are output match.
one is for the client, the other is for the server.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Just did install mysql today myself... Read carefull the output after pacman -S mysql, this should help !
I guess you can't login as root as there is not such account yet.
Once you've started the MySQL server, you probably want to add a root account in order to maintain your MySQL users and databases. This can be done manually or automatically, as mentioned by the output of the above script. Either run the commands to set a password for the root account, or run the secure installation script.
Last edited by May-C (2008-02-01 22:26:03)
Offline
grep socket /etc/my.cnf
make sure the path's that are output match.
one is for the client, the other is for the server.
Hi thanx for your reply. I typed this and this I got:
grep socket /etc/my.cnf
socket = /var/lib/mysql/mysql.sock
socket = /var/lib/mysql/mysql.sock
# All interaction with mysqld must be made via Unix sockets or named pipes.
@ May-C:
Ok. But what to do to check the root user status?
Thanks for all
~k3rn31
Offline
run in a console follwing:
mysql_secure_installation
Offline
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I don't think that I have already set a root password. What I must do now? I tried null pass and I hit enter but I got the ^^ error.
I tried to reinstall it but I didn't think that succeded.
Any ideas?
Thanks
Last edited by k3rn31 (2008-02-02 18:49:34)
~k3rn31
Offline
Any ideas for this ^^ how to safe remove mysql and settings and to reinstall it (and to set the root password correctly)?
I got backups. I only need to remove and reinstall mysql and a php mysql interface like phpmyadmin
Thanks
Last edited by k3rn31 (2008-02-03 09:06:17)
~k3rn31
Offline
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
After restart you have to do again as root:
/etc/rc.d/mysqld start
and then:
mysql_secure_installation
There is no need for reinstall the whole thing!
If you want to start mysql by every boot make sure you add mysqld too the deamons array in rc.conf!
Last edited by May-C (2008-02-03 11:04:18)
Offline
Thanks fixed. Another one question about phpmyadmin.
I installed, configured with config.inc.php and I got this:
Error
MySQL said: Documentation
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) .
Any ideas?
Thanks
~k3rn31
Offline
Now it's doing the same thing:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Anyone to help?
Thank you
~k3rn31
Offline
Pages: 1