使用SQL手动创建数据库并创建一个具有该数据库所有权限的用户

$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
 
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
 
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
 
mysql> EXIT
Bye
$

https://codex.wordpress.org/zh-cn:%E5%AE%89%E8%A3%85_WordPress

posted @ 2019-02-16 14:02  feiffy  阅读(...)  评论(...编辑  收藏