05-15-2019 05:08 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
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
05-15-2019 10:55 AM
05-15-2019 10:50 PM - edited 05-15-2019 10:51 PM
I have changed this line in my.cnf:
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!! ...