LoginSignup
2
1

More than 5 years have passed since last update.

MySQLにrootユーザーを作成して、rootパスワード設定する手順

Posted at

ローカルのMySQLmysql -u root -p、パスワードrootを入力して、ログインできなかった際の手順。

mysql.server startで起動を確認したら、mysql -u rootとコマンドを叩くとrootにアクセスできます。
GRANT構文の以下コマンドをコピペするするだけで、rootユーザーrootパスワードでアクセスできるようになります。

GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'root' WITH GRANT OPTION;
2
1
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
2
1