Jump to content

PHP, MySQL & JavaScript ; getting error 2002 in mysql following book to thwe dot

@ndros's Photo
Posted Dec 31 2011 05:12 PM

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

here the weird part: I got xampp as the book recommended and it say all servers are go!

when i tried to type the line in 'mysql -u root -p', the machine told me to get the right packages.

so i did sudo apt-get blah blah blah

got the same result

so i checked the directories, and 'lo! there is no .sock! even worse; there was no dir for it or anything!

whence i looked around the net all the suggestions pointed to further places that dont exist!


running latest ubuntu laptop

... contemplating windows.... ugh

thank you!

1 Reply

 : Jan 10 2012 08:28 AM

I'm sorry for the confusion. I'm forwarding this question to our book technical support group (booktech@oreilly.com) so they can help.

Kind Regards,

Rachel James
O'Reilly Media