数据库相关
解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
1.vim /etc/my.cnf文件
在文件末尾添加两行,这样下次登录跳过密码
[mysqld]
skip-grant-tables
重启mysql服务
修改密码
set password for ‘root’@‘localhost’=password(‘12345678’);
如果报:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
输入 flush privileges;刷新
再输入
set password for ‘root’@‘localhost’=password(‘12345678’);