Due to Operation errors, I uninstalled Mysql under Ubuntu and had to reinstall it. After a long time, I didn't install it. Run # sudoapt-getremovemysql-server #
Due to Operation errors, I uninstalled Mysql under Ubuntu and had to reinstall it. After a long time, I didn't install it. Run # sudo apt-get remove mysql-server #
Due to Operation errors, I uninstalled Mysql under Ubuntu and had to reinstall it. After a long time, I did not install it.
# Sudo apt-get remove mysql-server
# Sudo apt-get install mysql-server
Then run/usr/bin/mysqld_safe & the following error is prompted
Can't connect to local MySQL server through socket '/var/run/mysqld. sock' (2)
Indeed, there is no mysqld. sock file under/var/run/mysqld, and another error is:
/Etc/init. d/mysql: WARNING:/etc/mysql/my. cnf cannot be read. See README.Debian.gz
There is no my. cnf file under/etc. There is no way to do this, because the level is limited.
Finally, find a solution and execute
# Sudo apt-get install mysql-server mysql-common
Modify the mysql logon Password
# Sudo mysqladmin-u root-p password 'newpassword'
It mainly uses the mysql-common package, my. files such as cnf are from mysql-common, but before installation, it is best to clean all the mysql data that has been installed before. Other problems may occur during installation by name.
I learned about mysql.