ユーザー「wordpress」を作成し、phpMyAdminを介してmysqlで権限を付与しました。ただし、コマンドラインでユーザーワードプレスとしてログインすると、アクセスできるはずの場所にアクセスできないようです。見てください:
>mysql -u wordpress
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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> SHOW GRANTS;
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)
それが表示されるはずではありませんGrants for wordpress@localhost
か?
さらに、datbase sitedbでワードプレスのすべての(危険な、私は知っていますが、私は健全性テストを行っています)特権を付与しました。sitedbを使用しようとすると(これは同じセッションで)、次のようになります。
mysql> USE sitedb;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sitedb'
どうしたの?