Finally, there is an internet. This thing is a pit that I walked through a few days ago. Now let's record it.
For lower versions of Ubuntu, you can install MySQL directly with the following command
sudo apt install mysql-server
If installed here, MySQL 5.7 is installed by default, but due to compatibility issues, Ubuntu19 no longer supports its operation, including Ubuntu18.
During the installation process, there is no prompt to enter the root password. After the installation is complete, the root password is reset, but it still cannot log in normally. After querying, it is found that the higher version of Ubuntu no longer supports MySQL 5.7 The version is now available, and the specific information can be checked on the following page.
https://dev.mysql.com/downloads/mysql/
After stepping on the pit many times, I found that only the installation of MySQL8.3 can solve this problem perfectly.
You can download it in this link below
https://dev.mysql.com/downloads/repo/apt/
After the download comes back, execute the following command
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
After the previous selection is completed, switch to the bottom "OK", then press the "Tab" key, switch to the bottom ok and press Enter.
After that, it is a very normal operation. First perform the update and then install it. At this time, the 8.x version of MySQL is already installed. If you need to download other corresponding versions, just follow this method to download it.
sudo apt update
sudo apt install mysql-server
If it’s helpful to you, please click Ad or Looking, it is a kind of support for me
Recommended Posts