2

I'm running percona 5.5 on ubuntu 12.04 lts. mysql is running well.

root@ip-10-252-175-58:/var/lib/mysql/data# ps -ef | grep mysql root 2805 1 0 09:18 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe mysql 3247 2805 0 09:18 pts/1 00:00:04 /usr/sbin/mysqld --basedir=/usr --datadir=/ebs0/mysql/data/ --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/ebs1/mysql/logs/mysql-error.log --open-files-limit=65535 --pid-file=/var/lib/mysql/data/mysql.pid --socket=/var/lib/mysql/data/mysql.sock

but when i try to use mysqladmin status i get an error message:

root:/var/lib/mysql/data# mysqladmin status mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I have checked all the config files and haven't found anything that references /var/run/mysqld. Why does mysqladmin keep looking there instead of /var/lib/mysql/data? Thanks.

1 Answers1

0

Basically your socket file location is different than what mysqladmin is looking for.

In this case you have to fire the command by explicitly giving socket file path in mysqladmin command.

For example : mysqladmin -socket=/var/lib/mysql/data/mysql.sock

Vaibhav
  • 41
  • 3