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

MySQL忘记root密码怎么办_MySQL

2024/3/20 12:47:00发布18次查看
bitscn.com
mysql如果忘记了root密码,可以很方便的找回,方法如下:1.     先杀掉mysql的所有进程;#killall -term mysqld 2.    使用skip-grant-tables这个选项启动mysql;#/user/bin/safe_mysqld --skip-grant-tables & 3.  这时你就可以不使用密码登陆mysql了;#mysql -h localhost -u root -pmysql> use mysqlmysql> update user set password=password('newpassword') where user='root'; mysql> flush privileges;mysql> exit;  4.    关闭mysql; #/user/bin/mysqladmin -u root -p shutdownenter password:    stopping server from pid file /usr/local/mysql/data/ws01.pid071218 11:30:19  mysqld ended [1]+  done                    /usr/local/mysql/bin/safe_mysqld --skip-grant-tables  (wd: /ceno/product/cacti/include)(wd now: /usr/local/mysql/bin) 5.    正常启动mysql; #/user/bin/mysqld_safe --user=mysql & [1] 5583starting mysqld daemon with databases from /usr/local/mysql/data 6.    现在赶快试试你的新密码吧;    作者 wenrunchang123 bitscn.com
该用户其它信息

VIP推荐

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