| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | March 20 2000 7:54pm |
| Subject: | Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)) | ||
| View as plain text | |||
At 12:07 PM -0500 03-20-2000, Monika Plawna wrote: >Hi all, > >Yes, I'm a newbie, and yes, I know you will want to refer me to the >manual, but please hear me out. I've already tried that. > >I installed mysql 3.22.32 on HP-UX 10.2 as well as the DBI-1.13, >Data-Dumper-2.09, Msql-Mysql-modules-1.2018 >I also got Paul DuBois' book. > >I setup a user on the samp_db by the name of monika, I gave her a >password and I tried running a script from Paul's book (I changed the >user name and password), dump_members. >I got the following error: > >Error 2002 (Can't connect to local MySQL server through socket >'/tmp/mysql.sock' (2)) > >So I did the sensible thing and searched the list, but I found everyone >who asked about this was referred to the manual. So I've tried that. >I went through the section, trying every single suggestion - but they >all work! Here's the what I was able to execute: > >ps -ef | grep mysql >mysqladmin version >mysqladmin variables >mysqladmin -h `hostname` version variables >mysqladmin -h `hostname` --port=3306 version >mysqladmin -h <ip of my machine>' version >mysqladmin --socket=/tmp/mysql.sock version > >I also tried telnet <my host> 3306 and it worked too! I got the >version number, and then the following message >Bad handshakeConnection closed by foreign host. > >The only thing I'm not sure about is, I checked /tmp and I didn't find >mysql.sock. I don't know if it has to show up, but it didn't. However, >as I mentioned above, all the commands work, and if I tried to connect >using mysql -u monika -p samp_db it works like a charm. >Please help! > >Monika It looks like you can connect using a TCP/IP connection, but not by using a localhost (UNIX socket) connection. In your Perl script, try changing "localhost" in the DSN to the name of your machine and see what happens. Also, if you execute "mysqladmin variables", what pathname is printed for the "socket" variable? I would guess it's something besides /tmp/mysql.sock. -- Paul DuBois, paul@stripped
