6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

6
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?