(1698, "Access denied for user 'root'@'localhost'")
Mysql error handling problem:
When Django starts, an error is reported:
sudo mysql -u root
Enter the mysql command line
sue mysql
SELECT User, Host, plugin FROM mysql.user;
As you can see, the root user uses the auth_socket plugin
The root user can be set to use the mysql_native_password plugin
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
Exit and restart mysql
service mysql restart
Log in again. The query has been modified successfully.