Ubuntu MySQL 5.7 fix after Ubuntu Upgrade

There are bugs with MySQL after Ubuntu Upgrade.  (4 new server installations)

Bring it to work in just one line of code:


sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak && sudo rm -r /etc/mysql/mysql.conf.d/ && sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak && sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7 && sudo apt install mysql-server
sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d && sudo service mysql start

 

 What the Code above do:

  1. Back up while renaming the my.cnf file in /etc/mysql
  2. Remove the folder /etc/mysql/mysql.conf.d/
  3. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)
  4. In case your syslog shows an error like „mysqld: Can’t read dir of ‚/etc/mysql/conf.d/'“ create a symbolic link:
  5. That got it working! Then the service should be able to start again.

 

What i try to search in Google?

install php7-mysql
3306 mysql nicht erreichbar
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‚/var/run/mysqld/mysqld.sock‘ (2)
evtl. ist der Sockel des lokalen MySQL-Servers nicht korrekt konfiguriert
install php7-mysql ubuntu nginx
mysql nginx
 #2002 – No such file or directory<br />Der Server antwortet nicht (evtl. ist der Socket des lokalen MySQL-Servers nic…

Schreibe einen Kommentar