mysql基础知识
时间:2021-06-16 18:07:57
收藏:0
阅读:0
查看windows电脑的MySQL 版本的方法:
cmd 运行,输入:
mysql --version
启动mysql
mysqld
忘记密码
1、跳过授权表
mysqld --skip-grant-tables
2、现在可以任意的更改密码,执行如下命令
update mysql.user set authentication_string =password(‘你要的密码‘) where User=‘root‘;
update mysql.user set password = password(‘‘) where user=‘root‘and host=‘localhost‘
#注意()里面的单引号
3、刷新权限,执行命令
flush privileges;
4、退出mysql
exit
评论(0)