LoginSignup
6
6

More than 5 years have passed since last update.

dotinstall「WordPress入門」で躓いたポイント

Last updated at Posted at 2016-01-14

mysql>の画面にする方法がわからない

→ターミナルで、下記の手順でmysqlにログイン(接続)する。
cd MyVagrant
cd mycentos ・・・centosが入っているフォルダに移動
vagrant up ・・・起動
vagrant ssh ・・・接続
mysql ・・・ログイン(接続)

Access denied for user ''@'localhost' to database 'dotinstall_wordpressとエラーが出て対処法がわからない

→権限がないので、権限を与えてあげる。ターミナルで、下記の手順でデータベースを作成できるようにする
mysql -u root ・・・rootユーザーでログイン
set password for root@localhost=password('パスワード'); 
・・・rootユーザーは権限が大きいのでパスワードを設定する
exit ・・・一度ログアウト
mysql -u root -p ・・・-pでパスワード付きでログインする
create database dotinstall_wordpress ・・・rootでデータベース作成
grant all on dotinstall_wordpress.* to dbuser@localhost identified by 'パスワード'; 
・・・作業用ユーザー(dbuser)へdotinstall_wordpressの権限を与えて、作業用ユーザーを利用

Access denied for user 'root'@'localhost' (using password: NO)の対処法

→パスワード設定しているのに、-pを利用してパスワード入力していないのが原因
mysql -u root -p

おわり

6
6
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
6
6