Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Wordpress) Add doc on how to setup MySQL
- Loading branch information
1 parent
b1409be
commit 740e93d
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,28 @@ | |||
# Wordpress | |||
|
|||
1. Create the database datadir with `mysql_install_db`: | |||
|
|||
```bash | |||
$ mysql | |||
mysql> CREATE DATABASE wordpress_dtec; | |||
Query OK, 1 row affected (0.47 sec) | |||
``` | |||
|
|||
2. Set permissions/privileges for the Wordpress user: | |||
|
|||
```bash | |||
# Allow the dtec user to connect remotely to this MySQL server | |||
mysql> GRANT USAGE ON *.* TO 'dtec'@'%' IDENTIFIED BY PASSWORD '<pass>' | |||
|
|||
# Allow dtec user to connect 1) from any host and modify | |||
# everything in the the wordpress_dtec database. | |||
mysql> GRANT ALL PRIVILEGES ON `wordpress_dtec`.* TO 'dtec'@'%'; | |||
mysql> show grants for 'dtec'@'%'; | |||
+-----------------------------------------------------------------------------------------------------+ | |||
| Grants for dtec@% | | |||
+-----------------------------------------------------------------------------------------------------+ | |||
| GRANT USAGE ON *.* TO 'dtec'@'%' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' | | |||
| GRANT ALL PRIVILEGES ON `wordpress_dtec`.* TO 'dtec'@'%' | | |||
+-----------------------------------------------------------------------------------------------------+ | |||
2 rows in set (0.00 sec) | |||
``` |