This tutorial shows you how to install a MySQL database server on Debian/Ubuntu. You can install a MySQL database server on Debian/Ubuntu by doing the following:
Step 1. |
Open your VPS console from the Power Management control panel. |
Step 2. |
Log In to your VPS by entering your username and password. |
Step 3. |
Update the apt-get repository using the following command:
# apt-get update && apt-get upgrade
|
Step 4. |
Install the MySQL database server and client using the following command:
# apt-get install mysql-server mysql-client
Sample output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libxcb-render-util0-dev xulrunner-1.9.1 libxcb-render-util0
Use 'apt-get autoremove' to remove them.
Selecting previously deselected package libnet-daemon-perl.
(Reading database ... 159847 files and directories currently installed.)
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.612-1_amd64.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.016-1_amd64.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.49-3_amd64.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.49-3_amd64.deb) ...
...
,...
|
Step 5. |
You will be prompted to enter and repeat a new MySQL root password during installation. |
|
|
Step 6. |
Confirm the new MySQL root password by repeating it. |
|
|
|
If the installation was successful, the output will be as following: |
|
|
Step 7. |
MySQL server service runs at port 3306 by default. You can check if port 3306 is open by using the following command:
# netstat -tulpn | grep :3306
|
Congratulations, you have installed MySQL database server on Debian/Ubuntu.