Home > Database > Mysql Tutorial > Detailed explanation of solutions to 1449 and 1045 exceptions when connecting to MySQL

Detailed explanation of solutions to 1449 and 1045 exceptions when connecting to MySQL

黄舟
Release: 2017-09-06 14:47:12
Original
1328 people have browsed it

This article mainly introduces the relevant information about the solutions to 1449 and 1045 exceptions when connecting to MySQL. When connecting to MySQL through IP, 1499 and 1054 error exceptions will occur. Solutions are provided here. Friends in need can refer to them.

Solution to 1449 and 1045 exceptions when connecting to MySQL

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
Copy after login
Copy after login

Direct the sql to the local and execute the stored procedure Or check the video error report:

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
Copy after login
Copy after login

Permission problem, grant all sql permissions to root

mysql> grant all privileges on *.* to root@"%" identified by ".";
 
SQLException: The user specified as a definer ('ebook'@'%') does not exist:解决办法
grant all privileges on *.* to ebook@"%" identified by ".";
Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
#Mysql
Copy after login

A 1045 exception occurred during connection:

If it is before mysql 5.6, enter

UPDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root';
Copy after login

If it is after mysql 5.6 , enter

UPDATE mysql.user SET authentication_string=PASSWORD('root') WHERE USER='root';
Copy after login

This is because there is no password field in the user table after 5.6.

Enter FLUSH PRIVILEGES; to refresh the database.

The above is the detailed content of Detailed explanation of solutions to 1449 and 1045 exceptions when connecting to MySQL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template