登录mysql时总是提示:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
后来进入用 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables --user=root进入修改了密码,提示成功,但是还是进不了,提示一样的错误。
有一点很奇怪,我用--skip-grant-tables进去查看了一下用户列表是空的。
mysql> select user from mysql.user;
Empty set (0.00 sec)
怎么解决啊?
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
后来进入用 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables --user=root进入修改了密码,提示成功,但是还是进不了,提示一样的错误。
有一点很奇怪,我用--skip-grant-tables进去查看了一下用户列表是空的。
mysql> select user from mysql.user;
Empty set (0.00 sec)
怎么解决啊?
解决方案 »
- 5年前一个程序mysql数据库总记录数达100万了,速度慢
- 链接语句问题
- 高分!!!linux先忙mysql重启问题,报错:Starting MySQL../etc/init.d/mysql: line 159: kill: (4267) - No such process。
- hibernate连接MySQL数据插入的中文数据都变成了问号
- MySql中支持if exist吗?
- 这个sql语句要怎么写啊?
- 下载了java得驱动程序,请问怎么装上去?
- 请大神写一个较复杂的SQL
- 关于mysql对同一张表访问数超过200就会报错的问题
- 我的数据库表怎么增加不了中文记录
- 请教视图的写法
- 请教一下,这两条SQL语句执行效率哪个高点
/etc/init.d/mysql start –mysqld –skip-grant-tables
grant all on *.* to root@'localhost' identified by 'yourpassword';
grant all on *.* to root@'%' identified by 'yourpassword';
grant all on *.* to root@'localhost' identified by 'password';
grant all on *.* to root@'%' identified by 'password';