Preparing MySQL for Applications



Preparing MySQL for Applications

In most cases the developers of database applications expect the systems administrator to be able to independently prepare a database for their applications to use. The steps to do this include:

1.
Install and start MySQL.

2.
Create a MySQL root user.

3.
Create a regular MySQL user that the application will use to access the database.

4.
Create your application's database.

5.
Create your database's data tables.

6.
Perform some basic tests of your database structure.

The rest of the chapter is based on a scenario in which a Linux-based application named sales-test needs to be installed. After reading the sales-test manuals, you realize that you have to create a MySQL database, data tables, and a database user before you can start the application. Fortunately sales-test comes with a script to create the tables, but you have to do the rest yourself. Finally, as part of the planning for the installation, you decided to name the database salesdata and let the application use the MySQL user mysqluser to access it.

I'll cover all these common tasks in detail in the remaining sections.