当然バックアップとりますが、それを開発用のマシンにインポートのメモ
mysql -uroot -prルートのパスワード < 190530.sql
開発用のユーザ(xxx)でログインできない
$ mariadb -uthn -p
Enter password:
ERROR 1045 (28000): Access denied for user 'xxx'@'localhost' (using password: YES)
$mariadb -uroot -p
update mysql.user set password=PASSWORD('1234567') where user='xxx';
ただ、上記の処理をしてもダメな時があり、、、
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*8637AD513CC7ED5F46D72CD7C3C587CFC9522613' WITH GRANT OPTION |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
あれ?
MariaDB [(none)]> grant all privileges on *.* to 'thn'@'localhost';
MariaDB [(none)]> flush privileges;
OK
0 件のコメント:
コメントを投稿