MySQL登录出现Access denied for user 'root'@'localhost' (using password: YES)

mysql出现too many
whereis mysql
whereis init.d

设置max_connections = 1000
service mysqld restart
重启之后
mysql -u root -p
Can’t connect to local MySQL server through socket '/var/lib/mysql/mysql.soc

重启mysql
mysql -u root -p -S /data/mysql/mysql/mysql.sock

Access denied for user ‘root’@‘localhost’ (using password: YES)

修改 init.d
在[mysqld]后面任意一行添加“skip-grant-tables”用来跳过密码验证的过程

修改密码,重启重新登录

解决方案:修改本地数据库密码

你可能感兴趣的:(数据库)