This article describes how to install and uninstall MySQL on the ubuntu9.1 server, in fact, it is not very difficult to install and uninstall the MySQL database on the ubuntu9.1 server, as long as you perform the correct steps.
1. First install MySQL-server-5.1
- sudo apt-get install MySQL-server-5.1
In this process, you need to enter the root user password. At this time, you do not need to enter, just press Enter. If you enter it, there will be problems, and I don't understand why.
2. Install MySQL-server again.
- sudo apt-get install MySQL-server
3. Install phpmyadmin again.
- sudo apt-get install phpmyadmin
Log on to http: // hostname/phpmyadmin.
User root
The password is empty.
After entering, you can set a new password for the root user.
Note: do not generate a new password automatically. If it is automatically generated, remember the generated password.
4. Uninstall
The process of uninstallation is opposite to that of MySQL installation.
- sudo apt-get install MySQL-server
- sudo apt-get install MySQL-server-5.1
- sudo apt-get autoremove phpmyadmin
Delete all configuration files under/var/lib/MySQL to solve the problem of losing the MySQL root Password.
Copy the database file to another directory.
If the process is dead during apt-get remove, use sudo dpkg-configure-a in other consoles.
The above content is an introduction to the installation and uninstallation of MySQL under ubuntu9.1 server. I hope you will have some gains.
The above content describes how to install and uninstall MySQL on the ubuntu9.1 server. I hope it will help you in this regard.