Last active
August 29, 2015 14:23
-
-
Save abarth500/6b3d270ef7940dae0869 to your computer and use it in GitHub Desktop.
[情報科学実験I] MariaDBのrootパスワードリセット方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MariaDBのサービスを停める | |
sudo systemctl stop mariadb.service | |
#MariaDBをセーフモードで立ち上げる。 | |
sudo mysqld_safe --skip-grant-tables & | |
#rootでログイン | |
mysql -u root | |
#rootのパスワードを設定(MariaDBのコマンドライン上で) | |
use mysql; | |
update user set password=PASSWORD("ここにパスワードを記述") where User='root'; | |
flush privileges; | |
quit; | |
#セーフモードのMariaDBをkillするかリスタート | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment