error: Can't connect to local MySQL server through socket
Red HatThis forum is for the discussion of Red Hat Linux.
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: Can't connect to local MySQL server through socket
Hi all, if u please help me on this.
I get this error with mysql server:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
Well that file isn't there...dont' know why.
I've installed mysql server within the istallation of red hat 9. And i've updated my distro but still get the same error. I need this service running to test my 'Koha' server.
If u please help me... anything, I need to know how do I get this thing working.
Also the service can start:
# /etc/init.d/mysqld start
Starting MySQL: [ OK ]
but when trying to enter with mysqladmin -u <user> and all the rest, it fails with the error above.
Hi J0sep,
Normally this socket is on "/var/lib/mysql/mysql.sock". You may have some configuration mismatch between the server and the admin. Until you discover the mismatch, you can link it by entering
That actually solved a problem i've been having... could you possibly explain how i would go about finding this mismatch? I hate to leave it as a work around. I'd rather find the source of the problem.
My cnf is as follows. I wonder why the socket is set to /var/lib/mysql directory, but the php web application that was calling the db open function was looking for the /tmp/ sock. Could it be something I'm missing when I upgraded from 3.23 to 4.0.20?
I don't think so...
Historically all the sockets were open in /tmp, because they can be easily removed during boot up procedures. They don't need to exist when the server is not running. For a matter of security, nowadays, the things historically laid in /tmp are gaining another directories, because /tmp is accessible by all local users. The php server have a configuration, probably at "/etc/php4/apache/php.ini" where you can specify the location of the socket for php access.
Probably you installed only the client package. There is a package named "mysql-server" which contains the server. For more info about the available packages, use
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
hi i have installed mysql using command
yum install mysql
My distro is Fedora 8
and it installed it succesfully
but when i try service mysqld start it say Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
the Code of /etc/my.cnf is:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
I am so happy!
I solve my error questions"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'",because mysqld isn't run.We can find in "K menu-->setting-->service setting",if only you start mysqld ,you can input this "mysql -u root",then you can see this" mysql>".
But I don't know yours' systems ,my system is fedora 8 and I use "yum install mysql"installing mysql.
Hello all. I am kinda frustrated as I am really looking to get a greeting card suite working. I am thinking that some sort of data base program is how proprietary greeting card programs actually work. That would be the rational behind sticking with this attempt. It does seem that all *nix tech stuff is the base for the more closed API flavors.
I have the some of the same issues discussed in this thread but still am not sure how to handle this. This thread is dated as well.
Code: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
So could I use the advice posted in this thread for my issue. Sorry I am pretty lost as for what to do.
I got connection error to when tried to connect to mysql using mysql administrator also with 'mysql -u root'. I tried restarting httpd but cant fix it. Again I tried with 'service mysqld restart' and it worked.
Can anyone tell me whats the difference between httpd and mysqld.
I got connection error to when tried to connect to mysql using mysql administrator also with 'mysql -u root'. I tried restarting httpd but cant fix it. Again I tried with 'service mysqld restart' and it worked.
Can anyone tell me whats the difference between httpd and mysqld.
Thanks a lottt
Open your own thread, and ask the question. Don't hijack someone elses (old) question...that's very rude.
And you might want to try Google if you need such basic knowledge....
Open your own thread, and ask the question. Don't hijack someone elses (old) question...that's very rude.
And you might want to try Google if you need such basic knowledge....
I came to this site as I am having a Linux software issue, but seeing this post has really put me off.
This forum describes itself as "friendly" and it's tag-line is "where Linux users come for help".
Really? someone asks a question and get's told he/she is being "rude" (as the question may have been asked in the 'wrong' place) and is advised to bugger off to google as the enquiry is deemed too "basic" to bother helping with?
I think it's clear who is really being rude.
It's quite disgraceful behaviour from someone posting on, supposedly, a help forum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.