您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql 安全模式启动重置密码

2024/3/21 14:49:09发布40次查看
1 、停止正在运行的 mysql 进程 【 linux 】运行 killall -term mysqld 2 、以安全模式启动 mysql 【 linux 】运行 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables 【 windows 】在命令行下运行 x:/mysql/bin/mysqld-nt.exe --skip-grant-tables 3
1、停止正在运行的mysql进程
【linux】运行 killall -term mysqld
2、以安全模式启动mysql
【linux】运行 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
【windows】在命令行下运行 x:/mysql/bin/mysqld-nt.exe --skip-grant-tables
3、完成以后就可以不用密码进入mysql了
【linux】运行 /usr/local/mysql/bin/mysql -u root -p进入
【windows】运行 x:/mysql/bin/mysql -u root -p进入
4、更改密码
>use mysql
>update user set password=password(新密码) where user=root;
>flush privileges;
http://www.macophp.com/?action=show&id=3
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product