How to install and enable MySQL server on Linux OS

Complete tutorial on How to Install and enable MySQL server on Linux based Operating system.

MySQL is an open source database management system. It help to organize and retrieve data from SQL database.

MySQL work well with Apache and PHP. Hence it is used as backbone for most of website which needs and performs most database transactions.

Install MySQL Server on Linux OS

Install MySQL Server on Linux OS

To install MySQL, enter following command in terminal:

Above command install three programs, one install MySQL server. Second, install module to authorize and use Apache server with MySQL. Third, make MySQL work with PHP program.

Related:  Copy files from old web server to new server online using SSH

During installation, MySQL may ask you to create and set a root password. If you miss to set MySQL root password, you will have chance to set or change password later too.

Once you have MySQL in root, install MySQL DB on server using below command.

After installation, enter following command to install MySQL and run it securely.

sudo /usr/bin/mysql_secure_installation

Running first time might prompt you to enter password that you have set in earlier steps. If you haven’t set any password, simply press enter.

Going ahead, it will ask to secure MySQL server, enter Y or N based on your requirement. We would recommend to enter Y in every request.

Related:  Download and install mod_pagespeed on Linux server

Enter exit command to close MySQL connection and move to root folder.

Once you have installed and ran MySQL, you need to restart Apache server to make it work effectively.

Hence now you have completed installation and enabling MySQL server on Linux OS.

You may also like...

Leave a Reply

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