Installing MySQL on Ubuntu is as straightforward as Apache and forms the third component of a LAMP server. If you need to use the same information across several user sessions but still be able to change it without editing a web page, running MySQL will allow you to alter the content and behavior of your website without touching a single web page. Even better, with Ubuntu, it is just a couple clicks to a fully functioning database installation.
To install MySQL, as with other programs on Ubuntu, you can use a graphic frontend like Synaptic or Adept (for Kubuntu). Search for "mysql-server", select it, and click to apply. That package and several others will then be retrieved and installed. In the process of installation, the program will ask you for a root password for MySQL. It does not matter what you set this to, but you must remember this password in order to do any administration on MySQL. The system will ask you for the password twice, a second time for confirmation. This will leave you with a basic MySQL installation.
Alternatively, if you prefer not to use the graphic interface for the installation, you can use either Apt-Get or Aptitude to do it. Both follow the same syntax, but Aptitude tends to sort out program dependencies better. You can invoke Apt-Get with the following:
sudo apt-get install mysql-serveror use Aptitude:
sudo aptitude install mysql-serverInstalling a MySQL database on Ubuntu is that simple. With the MySQL server comes the MySQL client, as well. So you do not need to make a separate client installation to log into the MySQL database. While this and the Apache installation are quite simple, there is more you need to do before you can include more sophisticated web technologies on your site. The MySQL database configuration page addresses the easiest way to setup MySQL. After that, you can learn MySQL fundamentals with the page on MySQL basics.
MySQL Tutorials:
Install MySQL | Basic MySQL Configuration | MySQL Configuration In-Depth |
Apache Tutorials:
Install Apache | Basic Configuration | Apache In-Depth |
Recommend Web Hosting | Customising Apache | PHP Hosting |