[root] vi /etc/mysql/mysql.conf.d/mysqld.cnf
Comment out #bind-address = 127.0.0.1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Indicates that the root user password is wrong
Modify /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
skip-grant-tables
[root]sudo /etc/init.d/mysql restart
[root]mysql
mysql>use mysql;
mysql>update user set authentication_string = password("root") where user= 'root';
mysql> flush privileges;
mysql> quit;
Repair sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
#skip-grant-tables
[root]sudo /etc/init.d/mysql restart