How to install MySQL in Ubuntu?

0 votes
Can someone help me with the step by step installation of MySQL in Ubuntu?
Feb 27 in Database by Juhi
32 views

1 answer to this question.

0 votes

To install MySQL on ubuntu you have to follow the steps given below:-

Step 1: Type the following command on your Ubuntu machine.

sudo apt-get update 

sudo apt-get install mysql-server

Step 2: The installation will start and you will be prompted to set a password.

You have to re-enter the password.

Step 3: Your installation is complete. Now run the following command.

To allow remote access to your MySQL server, 

sudo ufw allow mysql

To start mysql service

systemctl start mysql

To launch MySQL after reboot 

systemctl enable mysql

Step 4: All done now let's start MySQL. Type the following command:

/usr/bin/mysql -u root -p

It will prompt you for password.

Now you can use MySQL. Hope this helps.

answered Feb 28 by Priyaj
• 56,160 points

Related Questions In Database

0 votes
0 answers

How to install Oracle DB on ubuntu?

Can anyone help me with the step ...READ MORE

Feb 28 in Database by Sukanya Rajput
35 views
0 votes
1 answer

How to display the queries executed by a particular user in MySQL?

From the version 5.1.7 onward, MySQL allows ...READ MORE

answered Mar 7 in Database by Mishti
• 480 points
28 views
0 votes
1 answer

How to load data of .csv file in MySQL Database Table?

At first, put the dataset in the ...READ MORE

answered Jul 5 in Database by Reshma
21 views
0 votes
1 answer

How to connect to MySQL Database?

using MySql.Data; using MySql.Data.MySqlClient; namespace Data { ...READ MORE

answered Oct 12, 2018 in Database by Frankie
• 9,810 points
71 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,100 points
35 views
0 votes
1 answer

Find values in a comma separated string in a MySQL query

You can add commas to the left and ...READ MORE

answered Sep 10, 2018 in Database by darklord
• 6,140 points
1,275 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by darklord
• 6,140 points
142 views
0 votes
1 answer
0 votes
1 answer

How to install MySQL in windows?

You can download the all in one ...READ MORE

answered Feb 27 in Database by Priyaj
• 56,160 points
21 views
+2 votes
1 answer

How to export data from MySql to a CSV file?

If you are using MySql workbench then ...READ MORE

answered Jan 4 in Database by Priyaj
• 56,160 points
62 views