Ubuntu/Debian - Installing MySQL
This tutorial walks you through installing MySQL on Ubuntu with the Aptitude repository system.
For this article, we are making these assumptions:
- You are running a brand-new server with no other software installed.
- You are running as a normal user with sudo priveledges.
Updating Your Repository
Use this command to ensure that we are working with a current set of repository data:
# sudo aptitude update
In order to make sure our packages install correctly, we must set the locale information for Perl using the following command:
# sudo aptitude install language-pack-en-base
In order to keep our server secure, we need to update all of the software on your server. We will use Aptitude to perform the update using this command.
# sudo aptitude upgrade
After the updates are finished, we can install the MySQL server.
# sudo aptitude install mysql-server
After the installation is finished, it begins to run on your server.
Now that we have the MySQL server running, we need to secure the installation.
1. Type this command to start the secure setup script:
# sudo /usr/bin/mysql_secure_installation
Your MySQL installation is now finished. Keep in mind that this only supports local connections and does not allow you to connect remotely. MySQL - Connect to your database remotely explains how to make this happen.
© 2014 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER