This page describes creating the database needed for WordPress. You can do this using the phmMyAdmin web interface, or you can do it from the command line of the terminal. This page describes using the terminal command line interface.
Run mysql in the terminal window:
Enter the root password you created previously for your mysql installation.
This will log you into the MariaDB command line interface.
Create the database for your WordPress installation as follows:
In the above example, I have named the database ‘wordpressdb’ but you can use any name you want.
Don’t forget to put the semi-colon at the end of the statement.
The terminal should say that a new row has been created indicating that the database was created.
Now create a user and grant database privileges to the new user. Note: you will need to enter your own password after IDENTIFIED BY. I am creating a user called ‘wordpressuer’, but you can use whatever name you want.
Then flush the database privleges:
Make a note of the database name, database username and password as you will need all of those values for the connection to WordPress.
You can check that you have created the database by entering the following in the terminal:
You can also check that you have created the user by entering the following in the terminal:
This will display the password in encrypted form of course.
Exit the MariaDB prompt with Ctrl + D.
Note that you could do the above using the phpMyAdmin interface. You can create the database and then enter the GRANT SQL script into the SQL execute box.