実現したいこと
- MySQLのログインをパスワード入力する状態に戻す
前提
ぐぐりながら、MySQLのパスワード設定をいじっていたら、mysql
コマンドだけでsudo
も何も付けていないのに入れてしまうようになってしまいました。
これをパスワードを入力しないと入れないように戻すにはどうしたらよいのでしょうか?
MySQLに入ったときのメッセージ
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.33-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
試したこと
-
sudo service mysql stop
sudo service mysql start
-
sudo service mysql restart
-
sudo pkill mysqld
sudo chown -R mysql:mysql /var/lib/mysql/
sudo service mysql start
-
OSの再起動
補足情報(FW/ツールのバージョンなど)
Ubuntu 22.04.2 LTS
mysql Ver 8.0.33-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。