search
LoginSignup
39

More than 5 years have passed since last update.

posted at

updated at

Organization

MySQL の root パスワード忘れた時

MySQL止める

sudo /etc/init.d/mysqld stop

セーフモードで起動

sudo mysqld_safe --skip-grant-tables &

つなぐ

mysql -uroot

再設定

use mysql
update user set password=PASSWORD("ここにパスワードを記述") where User='root';
flush privileges;

起動

sudo /etc/init.d/mysqld stop
sudo /etc/init.d/mysqld start

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
39