Problem with mysql client libraries.
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
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 themysql
command to specify a remote host, or (b) just run themysql
command on the database server itself.Can you please explain itby writing the command. As i am a beginner. Thnx
mysql -h (controller IP or hostname) -u root -p
as in
mysql -h 192.168.1.11 -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.
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.