First, you'll need to select names for your database and access account; for this example, let's use
To create the database and account, use the
# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2 to server version: 5.0.18
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> create database chrisblog;
Query OK, 1 row affected (0.01 sec)
mysql> grant all privileges on chrisblog.* to
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
Make sure that the
You can then enter the database, access account, and password information into the configuration of whatever software will use MySQL.
MySQL recommends that you add a password to
# /usr/bin/mysqladmin -u root password '
# /usr/bin/mysqladmin -u root -h $(
password '
# mysql -p
For example, to install Serendipity:
1. Download the Serendipity software from http://www.s9y.com and place it in the
2. Unpack the Serendipity software in the
3. # cd /var/www/html
4. # tar xvzf
5. Access that directory through a web browser at
Figure 7-23. Serendipity Installation verification page
1. If there are any permission errors, correct them using the instructions on the page and then click the Recheck Installation link at the bottom of the page. Once the check is successful, click on the Simple Installation link.
2. As shown in Figure 7-24 , enter the database, hostname, access account (database user), and password that you created in the MySQL database. Fill in the other fields, such as the blog title and the username and password you wish to use to administer the blog, using values of your choosing. Click on the Complete Installation link at the bottom of the page.
3. Figure 7-25 shows the confirmation page that appears. Click on the link labeled 'Visit your new blog here' to see your initial blog page, shown in Figure 7-26 .
Figure 7-24. Serendipity Installation page
Figure 7-25. Serendipity Installation confirmation page
Figure 7-26. Serendipity blog front page
7.9.2. How Does It Work?
MySQL is a Structured Query Language (SQL) database server. It provides rapid access to large sets of structured data, such as customer lists, sports scores, student marks, product catalogs, blog comments, or event schedules. The MySQL database runs as a server daemon named
Connections to the database server are made through the network socket
The
MySQL data is stored in
7.9.3. What About...
7.9.3.1. ...creating my own scripts and programs that access MySQL data?
Most scripting and programming languages have modules to access MySQL data. For example, you can use the database driver (DBD) module