Ubuntu Reinstallation Method after Removing mysql
- 2021-12-04 11:30:15
- OfStack
First delete mysql:
sudo apt-get remove mysql-*
Then clean up the residual data
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
It will pop up 1 dialog box, you select yes is good
Then install mysql
sudo apt-get install mysql-client mysql-server
You will be prompted to set the root password during installation. If you do not clean up the residual data during uninstallation, you will not be prompted to set the root password
Check if mysql is running
sudo service mysql status
1 will run automatically after the installation is completed.
If it is not running, you can
sudo service mysql start
Summarize