如何更改mysql数据库密码?
发布于 2015-07-17 05:37:46
在Ubuntu上设置/更改/重置MySQL根密码
在-UbuntuLinux7.10UtsyGibbon和MySQL 5.0.45上测试。(2007-10-21) -UbuntuLinux6.06DapperDrake和MySQL 4.1.15。
http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/
发布于 2015-07-17 05:35:10
在Ubuntu上设置/更改/重置MySQL根密码。在终端中输入以下行。停止MySQL服务器。
sudo /etc/init.d/mysql stop启动mysqld配置。
`sudo mysqld --skip-grant-tables` &以root用户身份登录到MySQL。
mysql -u root mysql用您的新密码替换YOURNEWPASSWORD!
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;https://stackoverflow.com/questions/31468871
复制相似问题