mysql客户端重置密码是多少,mysql重置root密码
你可以按照以下簡單的五步來重置
/etc/init.d/mysql stop
輸出:
Stopping MySQL database server: mysqld.
/usr/bin/mysqld_safe --skip-grant-tables &
輸出:
[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started
mysql -u root
輸出:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
mysql> use mysql;
mysql> update user set Password=PASSWORD("輸新root密碼") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysql stop
輸出:
Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended
[1]+ Done mysqld_safe –skip-grant-tables
/etc/init.d/mysql start
mysql -u root -p
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的mysql客户端重置密码是多少,mysql重置root密码的全部內容,希望文章能夠幫你解決所遇到的問題。