Problem with mysql client libraries.

asked 2014-04-03 10:00:11 -0600

Indeep_Minku-OPENSTACK gravatar image

Hello evryone.

I an Configuring my Compute Node. And one point it says -

  • Install the MySQL client libraries. You do not need to install the MySQL database server or start the MySQL service.

I installed MySQL client libraries through -

apt-get install mysql-client

I am confused at this point as whenever i write

mysql -u root -p

or mysql

It displays a error->

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

and when i tried to open /var/run/mysqld/mysqld.sock I couldnt find the mysqld dir in /var/run

edit retag flag offensive close merge delete



If you have a separate compute node, odds are that your MySQL server is running somewhere else. You would need to either (a) use the -h option to the mysql command to specify a remote host, or (b) just run the mysql command on the database server itself.

larsks gravatar imagelarsks ( 2014-04-03 10:06:59 -0600 )edit

Can you please explain itby writing the command. As i am a beginner. Thnx

Indeep_Minku-OPENSTACK gravatar imageIndeep_Minku-OPENSTACK ( 2014-04-03 10:08:34 -0600 )edit

mysql -h (controller IP or hostname) -u root -p

as in

mysql -h -u root -p

BUT now you have to ensure that you have mysql grant permissions from 'root'@'ipaddressofCompute', or you're going to get denied. Plus you have to verify that mysql is not listening only on localhost.

mpetason gravatar imagempetason ( 2014-04-03 11:20:21 -0600 )edit

Along what Larsks said, just run the mysql commands on the node with the database server if you are setting up databases and granting users permission.

mpetason gravatar imagempetason ( 2014-04-03 11:21:09 -0600 )edit