How to Install MySQL - Ubuntu - Linux - Latest

            How to Install and Run MySQL on Ubuntu Linux

                                            UIC MYSQL

         Today i will show you how to install and run MySQL on Ubuntu Linux. MySQL is basically Database management System use for internet websites and server applications. Keep your MySQL server secure by proceeding step 3. So lets start this guide.

Follow Steps Given Below: All Commands are written between  these punctuation marks  "".

1. Update System: First Update your System by entering command ,
                              "sudo apt-get update"
                              "sudo apt-get upgrade"
2. Install MySQL: Install it by command ,
                        "sudo apt-get install mysql-server"

While installing you have to set password for MySQL root user.

3. Secure MySQL: In this step you will make MySQL more secure by removing anonymous users, removing test database, disable root login from outside of localhost.

                               "sudo mysql_secure_installation"

4. Use MySQL: Now login into MySQL as user: root,

                                  "mysql -u root p"

  When it ask for password then write password  you Entered while installing.

Now you will see these Lines written on Screen means your MySQL working,

                 Lines: Welcome to the MySQL monitor. Commands end with ; or \g.................

5. Create New Database and User: If you want to create new MySQL user like root use these commands,
                                           "create database testdatabase;"
                                           "create user 'testuser'@'localhost identified by 'password';"
                                           "grant all on testdatabase.* to 'testuser';"

Note: Change (testdatabase, testuser, password) as your desired database, user, password.

6. Exit MySQL: Use this command when you are done with MySQL work and want to exit.
Thanks for Reading this Article

No comments

Powered by Blogger.