Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 05-15-2019 05:08 AM - edited 09-16-2022 07:23 AM
After install mysql as per this cloudera guide , which includes changing the "/etc/mysql/my.cnf" to the one they recommend.
Now when I try :
sudo mysql -u root -p
I get
Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I need to do it as follows to be able to connect to mysql:
mysql -u root -p -h 127.0.0.1
by the way I have tried the following to solve it but with no luck .... same error
sudo mkdir -p /var/run/mysqld/ sudo touch /var/run/mysqld/mysqld.pid sudo touch /var/run/mysqld/mysqld.sock sudo chown mysql:mysql -R /var/run/mysqld sudo service mysql restart
Created on 05-15-2019 10:50 PM - edited 05-15-2019 10:51 PM
I have changed this line in my.cnf:
socket=/var/lib/mysql/mysql.sock
to this
socket=/var/run/mysqld/mysql.sock
and that fixed it!
I think Cloudera has to review its installation guide ... I have faced many difficulties so far ...
They tell you to do A and B to get C ... you do A and B but you don't get C!! ...
Created 05-15-2019 07:25 AM
Check bind-address in my.cnf config file, is it set to 127.0.0.1?
Created 05-15-2019 10:55 AM
Created on 05-15-2019 10:50 PM - edited 05-15-2019 10:51 PM
I have changed this line in my.cnf:
socket=/var/lib/mysql/mysql.sock
to this
socket=/var/run/mysqld/mysql.sock
and that fixed it!
I think Cloudera has to review its installation guide ... I have faced many difficulties so far ...
They tell you to do A and B to get C ... you do A and B but you don't get C!! ...