MySQL Server and Client need to be installed using the following steps; we will be using MySQL as our primary database in this book:
In a standard Ubuntu installation, MySQL can be installed by executing the following command in the shell prompt:
$ sudo apt-get install mysql-server mysql-client
After the installation is complete, MySQL Server will start automatically. To check if MySQL Server is running, run the following command:
$ sudo netstat -tap | grep mysql
The command should give an output that is similar to the following; this means that the MySQL daemon is running:
tcp 0 0 localhost:mysql *:* LISTEN 923/mysqld
If, for some reason, MySQL Server is not running, you can start the server by running the
restart
command:$ sudo service mysql restart
We have just installed MySQL; we have the LAMP stack ready too. Our next step will be to create a database in MySQL Server.
Having gone through this section, feel free to attempt the task in the following section.
phpMyAdmin is a free, open source web-based database administration tool written in PHP. phpMyAdmin provides a web-based UI to manage MySQL Database Server; add / remove / manage databases, users, privileges; and so on. In this book, we will be using phpMyAdmin as the database Administration Interface for managing our database(s).
Now that we have Apache, PHP, and MySQL installed, our next step will be to create a blank database in MySQL Server.
For doing this, we need to install and configure phpMyAdmin in the Zend Server.
Tip
phpMyAdmin can either be downloaded from http://www.phpmyadmin.net/ or installed from your operating system's repositories.
Installation instructions for phpMyAdmin can be found at the following link:
In our next task we will be creating a MySQL database, creating users in the MySQL server and also grant them access permissions to connect to the database and perform database operations.