Remove all files related to MySQL

sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
Then upgrade my distribution
sudo apt-get dist-upgrade

Run these commands in the terminal:

sudo apt-get remove –purge mysql-server mysql-client mysql-common

sudo apt-get autoremove
sudo apt-get autoclean

install mysql ————————————
Step 1 — Installing MySQL
On Ubuntu 18.04, only the latest version of MySQL is included in the APT package repository by default. At the time of writing, that’s MySQL 5.7

To install it, update the package index on your server with apt:

sudo apt update
Then install the default package:

sudo apt install mysql-server
This will install MySQL, but will not prompt you to set a password or make any other configuration changes. Because this leaves your installation of MySQL insecure, we will address this next.

Step 2 — Configuring MySQL
For fresh installations, you’ll want to run the included security script. This changes some of the less secure default options for things like remote root logins and sample users. On older versions of MySQL, you needed to initialize the data directory manually as well, but this is done automatically now.

Run the security script:

sudo mysql_secure_installation

Nguồn: https://shaarique.com/

Xem thêm bài viết khác: https://shaarique.com/cong-nghe/

3 Comments

Kareem Shobier

July 1, 2020

Thank you man, you helped my with your video

Reply

Raju Ansari

July 1, 2020

screen mein Jo light hNahi band ho Rahi h

Reply

pablo adrian gonzalez

July 1, 2020

Gracias, gracias, gracias, gracias, gracias, gracias, gracias……

Reply

Leave a Reply