Mysql has stopped functioning

slander

Verified User
Joined
Mar 11, 2013
Messages
14
Hello good folks,

I was trying to backup (dump) an SQL database, however, mysqldump was not installed, so I installed mysql-client to get mysqldump. However, this has compounded problems. First and foremost, mysql has stopped working, with this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).

Secondly, mysqldump is giving me these errors:

mysqldump: /usr/local/mysql/lib/libmysqlclient.so.16: no version information available (required by mysqldump)
mysqldump: relocation error: mysqldump: symbol disabled_my_option, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference

Maybe it's because MySQL is not working?

If anyone could help me with these issues, I'd greatly appreciate it. Thank you in advance.
 
Hello,

I was trying to backup (dump) an SQL database, however, mysqldump was not installed

That's not correct. The mysqldump is located in /usr/local/mysql/bin/mysqldump; the path might be not in your enviroment, and the binary is not linked to regular bin/ directories.

so I installed mysql-client to get mysqldump

You should not do that. You need to remove it.
 
The first error is due to to your my.cnf not pointing to the correct location of your MySQL socket (see socket setting), which should agree with your php.ini location of the socket file.

The second error is typically due to you have more than on libmysqlclient.so's installed on the system. You need to remove the the second one. As zEitEr says, you need to remove the second one you installed and use the mysqldump that was installed. Just because something isn't in the PATH doesn't mean it wasn't installed. You can always use something like this to find what you are looking for:
cd /
find . -name mysqldump
That will traverse the whole filesystem and search for a file or directory named mysqldump. This is normally overkill too, since most of what you are looking for will be in /usr or a subdirectory of /usr, so that would be the better anchor to use instead of / .
 
Back
Top