How to install MySQL on Debian VPS

How to install MySQL on Debian VPS
In this tutorial we will explain how to install MySQL on Debian VPS.

WHAT IS MYSQL?

MySQL is a popular open source relational database. The popularity of MySQL means there is an abundance of information online and well documented client libraries available.

Installing MySQL on Ubuntu VPS is pretty easy and straight forward procedure.


LET’S START

First, you will need to log in to your VPS as ROOT via SSH. Once you are in the first thing you need to do is to downloads the package lists from the repositories and “update” them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs. To do that just type:

apt-get update

The next step/command will actually update all the software on your VPS. It is not necessary for installing MySQL but it is always a good practice. So, type:

apt-get upgrade

Now we can install MySQL. To do that type:

apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

And that’s it.

Once MySQL is installed, we can activate it with the following command:

mysql_install_db

After that we will need to set some basic security the MySQL service. To do that just run the following script.

/usr/bin/mysql_secure_installation

It is recommended to accept the default action for all questions which is yes.

You can enable the MySQL service to start at the system boot automatically with the following command:

update-rc.d mysql defaults

To stop the MySQL service you can use:

service mysql stop

To start the MySQL service you can use:

service mysql stop

If you’re one of our Linux VPS Hosting customers we can help you install and configure the MySQL on your virtual server for you free of charge. Just contact us and some of our experts will complete your request immediately.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>