- Apache Roller 4.0 – Beginner's Guide
- Alfonso Romero
- 267字
- 2025-02-25 13:44:21
Time for action — creating a MySQL database for Roller
In this exercise, you'll use the MySQL monitor to create a database for your Apache Roller blog site.
- Open a command prompt window (Start | All Programs | Accessories | Command Prompt) and type
mysql -u root -p
. - The MySQL monitor will ask you to Enter Password. This is the password you used when installing MySQL Server. Type it and press Enter. If the password is correct, the following screen shall appear:
- Now type the following lines after the
mysql>
prompt (remember to replace password with a secure password) and press Enter after each line:create database rollerdb; grant all on rollerdb.* to roller_user@'%' identified by 'password'; grant all on rollerdb.* to roller_user@localhost identified by 'password';
- When finished, your screen should look like this:
- Notice the Query OK, 0 rows affected (X.XX sec) line after each line you typed. It means there were no errors with the commands you entered. Now type
exit
and press Enter to exit the MySQL monitor, then typeexit
to close the Command Prompt window.
What just happened?
In this last exercise, you used the MySQL monitor to create the rollerdb
database, and then created a database user named roller_user
. You then assigned permissions to roller_user
, so it can create, modify, and delete tables inside the rollerdb
database. Note that the password you used for the rollerdb
database isn't the same as your MySQL root user's password. Remember that the "root" user has access to all the MySQL server configuration, and the user named roller_user
only has access to your rollerdb
database.