0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

mysql/mariadbのrootパスワード再設定

Posted at

/etc/my.conf

[mysqld]
skip-grant-tables

mariadbの再起動

systemctl restart mariadb;
mysql

mysqlに接続してPasswordのハッシュを上書き

use user;
update user set Password = PASSWORD('password') where User = 'root';
flush privileges;
quit;

/etc/my.confの追加記述をコメントアウトしてmariadbを再起動

systemctl restart mariadb;
mysql -u root -p

identified by はユーザ作成時だけらしい・・・

ALTER USER 'root'@'localhost' identified BY 'hoge';
0
0
0

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
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?