Sin categoría

Linux sql

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ https://stackoverflow.com/questions/37365470/2002-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq $ sudo -i # sudo apt-get remove --purge mysql\* # cp -R /var/lib/mysql /home/user/backup # sudo rm -rf /var/lib/mysql/ # sudo rm -rf /etc/mysql # sudo apt-get autoremove # sudo apt-get autoclean # sudo apt-get install mysql-server php5-mysql Login at root from the CLI: https://stackoverflow.com/questions/61430362/ubuntu-20-04-set-mysql-phpmyadmin-root-password sudo mysql -u root -p Then ALTER USER 'root'@'localhost' IDENTIFIED BY '<New-Password-Here>'; To Really Get Things Working From phpmyadmin.net Due to changes in the MySQL authentication method, PHP versions prior to 7.4 are unable to authenticate to a MySQL 8.0 blah blah blah blah https://bugs.php.net/bug.php?id=76243.There is a workaround, that is to set your user account to use the current-style password hash method, mysql_native_password. [...]