ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Hi There, I am very, very new to Linux. I am using Fedora Core 2. I am attempting to get mysql to work for me. I have looked at previous threads and the solutios don't seem to work for me.
I tried :
chown -R mysql /var/lib/mysql/*
chgrp deamon /var/lib/mysql/*
But i am being told :
chgrp: invalid group name `deamon'
I am desperate to get this working, any help anyone can give me would be hugely appreciated,
Thanks a million for your response. I changed the spelling, but then when i try to start mysql it is still giving me the same error. Is there anything else obvious that you can thing of that I may not be doing?
Are you sure the daemon is running? Many distributions do not start the daemon by default. You might run a test. The actual starting of the daemon is controlled by a script located in the init.d directory. (It will either be /etc/init.d/mysqld or /etc/rc.d/init.d/mysqld). As root attach to that directory and then issue ./mysqld start. If that works, you should modify the startup scripts to automatically start the daemon. Perhaps the easiest way is to use the graphical tools under kde or gnome to modify the services (daemons) that start. Good luck
This can happen when the user (in the current case user 'mysql') doesn't have permissions to write to the directory where the lockfile should be created.
Either set permissions to the given location so that mysql can write to it, or choose another location by changing the my.cnf file.
run 'ls -l /var/lib' and 'ls -l /var/lib/mysql' to see the ownership and permissions of that directory and it's contents.
error: 'Can't connect to local MySQL server through socket '
Hi,
i am stuck with this error ... its detail is as follows.
1. I installed EL5 then i check for mysql...
[root@localhost Server]# rpm -ivh mysql-*
warning: mysql-5.0.45-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package mysql-5.0.45-7.el5 is already installed
[root@localhost Server]#
Q1. Does it mean that mysql is installed or not?
2. I have no entry in /etc/init.d/ for mysql or mysqld.
[root@localhost ~]# /etc/init.d/mysql
-bash: /etc/init.d/mysql: No such file or directory
[root@localhost ~]# /etc/init.d/mysqld
-bash: /etc/init.d/mysqld: No such file or directory
3.When i tried this
mysqladmin -u root password mysqldata
i got [root@localhost ~]# mysqladmin -u root password mysqldata
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
..........
First of all you shouldn't reply to such an old post. It's better to create a new one to get the responses that might help you.
Anyway, to answer your question, you need to install also the server package named mysql-server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.