Chapter 3. Installation
Like most services, the MySQL and mSQL databases run as background processes (also called daemons on Unix systems). This chapter gives an overview on how to unpack and build them.
MySQL
Before you begin installing MySQL, you must answer a couple of questions.
Are you going to install MySQL as root or as another user?
MySQL does not require root access to run, but installing it as root will enable you to make one copy available to everyone on your system. If you do not have root access, you will have to install it in your home directory. However, even if you install MySQL as root, it is a very good idea to run it as a different user. In this way, all data in the database can be protected from all other users by setting the permissions on the data files to only be readable by the special MySQL user. In addition, if the security of the database becomes compromised, the attacker only has access to the special MySQL user account which has no privileges beyond the database.
Are you going to install MySQL from source or from binary?
There are many precompiled binary packages of MySQL available. Using this method can save time, but limits the amount of customization you can do on your installation. To install from source you need a C compiler and other development tools. If you have these, the benefits gained from installing from source usually outweigh the minor hassles.
Warning
These two questions are not mutually exclusive. If you install from a binary package you have ...
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.