首页 > IT职业 > IT图书 > mysql怎么查看root密码

具体方法:
(推荐教程:mysql数据库学习教程)
首先以root身份登录MySQL
mysql -uroot
选择mysql数据库
mysql> use mysql
最后执行如下命令即可查看root密码。
mysql> select authentication_string from user where User='root'; +-------------------------------------------+ | authentication_string | +-------------------------------------------+ | *781D25322166DB7FF99BA4A1FA5ED30439A60DDE | +-------------------------------------------+ 1 row in set (0.01 sec)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2548/viewspace-2832604/ ,如需转载,请注明出处,否则将追究法律责任。