Flag This Hub

Step by Step instructions to install My-SQL database and steps to improve the security of the My-SQL in Ubuntu Linux

By


Click thumbnail to view full-size

First of all lets see what is My-SQL?
It is that world's most popular open source relational database management system or called as RDBMS developed by Ulf Michael Widenius from Helsinki, Finland using C & C++. Ulf Michael Widenius daughter name was "My" and the SQL stands for Structured Query Language.So he named his discovery as the My-SQL.It is the main component in the LAMP [Linux,Apache,My-SQL & PHP] web application.

Lets start with the Software & Hardware requirments we need before starting the procedure.

Software requirements :

a) Ubuntu Operating system [11.10 is the latest stable version avaliable in 32 bit and 64 bit can be downloaded from Ubuntu website]

b) Terminal window [ pre-installed in Ubuntu or can be downloaded from Ubuntu Software center]

Hardware requirements :

Desktop PC or Notebook with

a) 1 GHz x86 processor [Pentium 4 or above that]

b) 1 GB RAM [system memory]

c) 15 GB of hard-disk space or USB stick or memory card or external hard drive drive

d) A CD/DVD drive or a USB port for the installer media

e) Internet access [High speed will be better]


Now lets start the installion procedure.

1) Close all the Application's.

2) Connect to the Internet.

3) Open the Terminal window & copy-paste the code:

sudo apt-get install mysql-server-5.1

4) press the Enter key.

5) Now the Terminal will ask for the root password of your operating system [Ubuntu] to authenticate the code.

6) Enter your valid root password & press the Enter key.

7) Now the My-SQL files will start downloading to your computer [Takes some time depends on the Speed of Internet]

8) Once the Download is over, just follow the On-Screen Instructions in the Terminal Window.

9) At the time of the Installion the My-SQL will ask to enter the root user password for the My-SQL in a password box.

[To move around the password box you can use the "TAB" key in the keyboard]

[ For better security of data having a strong password with combination of Numbers & Alphabets with lowercase & uppercase is a better option and one more thing is that also keep in mind that longer the password better will be the data security]

10) Once the installion is finished you will be automatically directed to the terminal window

11) Now we have to activate the My-SQL for that you have to copy-paste the code:

sudo mysql_install_db

12) press the Enter key

13) The My-SQL installion is success.


Now we are going to increse the Security of the My-SQL.


14) In the same terminal window copy-paste the code:

sudo mysql_secure_installation

15) press the Enter key.

16) Now you have to enter the password of MySQL that you have created in the Step "9".

17) Once the password is entered press the Enter key.

18) At this time My-SQL will ask you Change the password [ if you want to change the password press "y" and press enter key to enter the current password and the new password or else press the "n" and press the Enter key]

19) Now My-SQL will ask you to remove any anonymous user from the database [press “y” and press enter key to move to next step]

20) Now My-SQL will ask you to block any MySQL root user from logging remotely to database [press “y” and press enter key to move to next step]

[ The step "20" is used to avoid hacker's and outsider who can guess the password and login to your databases to steal or destroy the data from the database]

21) Now My-SQL will ask you to delete the test database from the database [ press “y” and press enter key to move to next step ]

[ The MySQL package's comes with test database where anyone can login to access the database this is also a security problem]

22) So we have successfully activated the My-SQL Security option.

23) Now you can close the terminal window.


So we have successfully installed the My-SQL database and also incresed the Security of the My-SQL database.

For more information and updates visit Technology Writer

Comments

No comments yet.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working