MySQL Error Handling

NO1. Use the link Navicat MySQL database error

Error contents:

Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found.

Program:

  1. MySQL Command Line Login
mysql -u root -p
  1. Enter a SQL statement, which statement is yourpassword MySQL password.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';

No2.Ubuntu Forgot mysql password process

demand:
Ubuntu MySQL password is forgotten the next.
solve:

  1. Stop mysql service
sudo /etc/init.d/mysql stop
  1. Log into safe mode
 sudo mkdir -p /var/run/mysqld
 sudo chown mysql:mysql /var/run/mysqld
 sudo /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &   
 mysql -u root
  1. Changing the root password
 use mysql;
 update user set authentication_string=PASSWORD("你的新密码") where User='root';
 update user set plugin="mysql_native_password";
 lush privileges;
 quit;

No3.Ubuntu completely uninstall MySQL

demand:
Uninstall MySQL
Program:

  1. Uninstall to remove the MySQL
 sudo apt-get autoremove --purge mysql-server-5.0
 sudo apt-get remove mysql-server
 sudo apt-get autoremove mysql-server
 sudo apt-get remove mysql-common
  1. Delete superfluous than to clean up residual data
 dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
 sudo find /etc -name "*mysql*" |xargs rm -rf
  1. Check whether a clean uninstall
 sudo dpkg -l | grep mysql
Published 15 original articles · won praise 9 · views 2648

Guess you like

Origin blog.csdn.net/qq_38413498/article/details/104768924