8 个解决方案
#1
这又不是你把root的密码清理就可以不用密码登录的,还有这授权有问题。你是将谁的权限授权给root,可以看下http://blog.csdn.net/u011575570/article/details/46884619。
#2
Follow the steps below.
Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
$ mysqld --skip-grant-tables
Execute these statements.
$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
Finally, restart the instance/daemon without the --skip-grant-tables option.
$ /etc/init.d/mysql restart
You should now be able to connect with your new password.
$ mysql -u root -p
Enter password: my_password
Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
$ mysqld --skip-grant-tables
Execute these statements.
$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
Finally, restart the instance/daemon without the --skip-grant-tables option.
$ /etc/init.d/mysql restart
You should now be able to connect with your new password.
$ mysql -u root -p
Enter password: my_password
#3
用mysql -uroot -h127.0.0.1能登陆吗?
#4
你输入 mysql -u root -p,然后他让你输密码的时候你直接回车
#5
没用的
#6
不行。。。
#7
windows系统下面试了,不行。。。
#8
会不会是密码没清掉,你用我这个方法试试呢?
http://blog.csdn.net/zhu19774279/article/details/47016473
http://blog.csdn.net/zhu19774279/article/details/47016473
#1
这又不是你把root的密码清理就可以不用密码登录的,还有这授权有问题。你是将谁的权限授权给root,可以看下http://blog.csdn.net/u011575570/article/details/46884619。
#2
Follow the steps below.
Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
$ mysqld --skip-grant-tables
Execute these statements.
$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
Finally, restart the instance/daemon without the --skip-grant-tables option.
$ /etc/init.d/mysql restart
You should now be able to connect with your new password.
$ mysql -u root -p
Enter password: my_password
Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
$ mysqld --skip-grant-tables
Execute these statements.
$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
Finally, restart the instance/daemon without the --skip-grant-tables option.
$ /etc/init.d/mysql restart
You should now be able to connect with your new password.
$ mysql -u root -p
Enter password: my_password
#3
用mysql -uroot -h127.0.0.1能登陆吗?
#4
你输入 mysql -u root -p,然后他让你输密码的时候你直接回车
#5
没用的
#6
不行。。。
#7
windows系统下面试了,不行。。。
#8
会不会是密码没清掉,你用我这个方法试试呢?
http://blog.csdn.net/zhu19774279/article/details/47016473
http://blog.csdn.net/zhu19774279/article/details/47016473