How To Install WordPress with Nginx on Ubuntu 14.04 | DigitalOcean
We have the MySQL database software installed, but we have not
created a database for our WordPress information. We also need to
create an account that WordPress can use to access the database we will
be creating.
We should begin by logging into an interactive session with our MySQL administrative account like this:
You will be prompted for the password that you chose for the MySQL
root account when you installed the software. You will be given a MySQL
command prompt.
Now, we can create a separate database that will be used exclusively
by our WordPress application. The name is not important, but it should
probably be descriptive so that you can easily recognize it. In this
guide, we will call our database
Note the semi-colon (;) that ends the MySQL statement. Each MySQL
statement must end with one, so double-check that if you are running
into issues.
We have a database now, so we are ready to create a user account. We
will then hand over control of the database to this new user so that
our application can interact with the database. This system of creating
a separate database and user for each application helps keep our data
separate from other data being stored by MySQL, which is good for
security and data management.
For this guide, we'll pick
We'll assign it a password of
Now, we have a database and a user, but we haven't established a
relationship between the two yet. We need to tell MySQL that our new
user can access and control the database. You can do that with this
command:
Create a MySQL Database and User for WordPress
The first thing that we need to do to get started with WordPress is to prepare our database.We have the MySQL database software installed, but we have not
created a database for our WordPress information. We also need to
create an account that WordPress can use to access the database we will
be creating.
We should begin by logging into an interactive session with our MySQL administrative account like this:
mysql -u root -p
You will be prompted for the password that you chose for the MySQL
root account when you installed the software. You will be given a MySQL
command prompt.
Now, we can create a separate database that will be used exclusively
by our WordPress application. The name is not important, but it should
probably be descriptive so that you can easily recognize it. In this
guide, we will call our database
wordpress
:CREATE DATABASE wordpress;
Note the semi-colon (;) that ends the MySQL statement. Each MySQL
statement must end with one, so double-check that if you are running
into issues.
We have a database now, so we are ready to create a user account. We
will then hand over control of the database to this new user so that
our application can interact with the database. This system of creating
a separate database and user for each application helps keep our data
separate from other data being stored by MySQL, which is good for
security and data management.
For this guide, we'll pick
wordpressuser
for our account name.We'll assign it a password of
password
to authenticate with. When you are setting up your own configuration, you should select a more secure password:CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
Now, we have a database and a user, but we haven't established a
relationship between the two yet. We need to tell MySQL that our new
user can access and control the database. You can do that with this
command:
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost;
No comments:
Post a Comment