How to install MySQL in Ubuntu

0 votes
Can someone help me with the step by step installation of MySQL in Ubuntu?
Feb 27, 2019 in Database by Juhi
1,087 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, 2019 by Priyaj
• 58,100 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, 2019 in Database by Sukanya Rajput
721 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, 2019 in Database by Mishti
• 480 points
4,217 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, 2019 in Database by Reshma
1,324 views
0 votes
0 answers

How to run SQL script in MySQL?

I want to use MySQL to run ...READ MORE

Aug 11, 2022 in Database by Kithuzzz
• 38,020 points
439 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,250 points
1,178 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 Sahiti
• 6,370 points
12,839 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 Sahiti
• 6,370 points
2,266 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 28, 2019 in Database by Priyaj
• 58,100 points
981 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, 2019 in Database by Priyaj
• 58,100 points
1,458 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP