Uninstall Mysql Completely in Ubuntu 16.04 /18.04 [ Hindi ] || Install fresh mysql

Home » Uninstall Mysql Completely in Ubuntu 16.04 /18.04 [ Hindi ] || Install fresh mysql
Uninstall Mysql Completely in Ubuntu 16.04 /18.04 [ Hindi ] || Install fresh mysql



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/

Leave a Reply

Your email address will not be published.