mysql root密码重置
First things first. Log in as root and stop the mysql daemon. sudo /etc/init.d/mysql stop Now lets start up the mysql daemon and skip the grant tables which store the passwords. sudo mysqld_safe --skip-grant-tables& (press Ctrl+C now to disown the process and start typing commands again) You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password. sudo mysql --user=root mysql update user set Password=PASSWORD('new-password'); flush privileges; exit; Now kill your running mysqld then restart it normally. sudo killall mysqld_safe& (press Ctrl+C now to disown the process and start typing commands again) /etc/init.d/mysql start You should be good to go. Try not to forget your password again. |
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11