Solution to 1449 and 1045 exceptions when connecting to MySQL

Solution to 1449 and 1045 exceptions when connecting to MySQL

Solution to 1449 and 1045 exceptions when connecting to MySQL

mysql 1449: The user specified as a definer ('root'@'%') does not exist Solution

Import the SQL to the local computer, execute the stored procedure or view the video error:

mysql 1449: The user specified as a definer ('root'@'%') does not exist Solution

Permission issue, grant root all sql permissions

mysql> grant all privileges on *.* to root@"%" identified by ".";
 
SQLException: The user specified as a definer ('ebook'@'%') does not exist: Solution: 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

1045 exception occurred during connection:

If it is MySQL 5.6 or earlier, enter UPDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root';

If it is MySQL 5.6 or later, enter UPDATE mysql.user SET authentication_string=PASSWORD('root') WHERE USER='root';

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

Type FLUSH PRIVILEGES; to refresh the database.

If you have any questions, please leave a message or come to the community to discuss. Thank you for reading and I hope it can help you. Thank you for your support of this site!

You may also be interested in:
  • Summary of handling JDBC connection mysql garbled code exception problem
  • SELinux causes PHP to connect to MySQL abnormally. Solution to Can't connect to MySQL server
  • Sharing of experience on repairing MySQL innodb exceptions
  • How to solve the abnormal error ERROR: 2002 in mysql
  • MySQL definition and exception handling details
  • Analysis of exception handling in mysql stored procedures
  • MySQL database connection exception summary (worth collecting)

<<:  Tomcat+Mysql high concurrency configuration optimization explanation

>>:  Detailed explanation of the use of state in React's three major attributes

Recommend

MySQL data table partitioning strategy and advantages and disadvantages analysis

Table of contents Why do we need partitions? Part...

How to use CSS attribute value regular matching selector (tips)

There are three types of attribute value regular ...

What to do if the container started by docker run hangs and loses data

Scenario Description In a certain system, the fun...

5 VueUse libraries that can speed up development (summary)

Table of contents What utilities does VueUse have...

Elements of user experience or elements of web design

System and user environment design <br />Th...

Analysis of Context application scenarios in React

Context definition and purpose Context provides a...

Vue implements two routing permission control methods

Table of contents Method 1: Routing meta informat...

js to write the carousel effect

This article shares the specific code of js to ac...

Detailed steps for implementing timeout status monitoring in Apache FlinkCEP

CEP - Complex Event Processing. The payment has n...

Using Nginx to implement grayscale release

Grayscale release refers to a release method that...

Details after setting the iframe's src to about:blank

After setting the iframe's src to 'about:b...

Detailed tutorial on installing MySQL 8 in CentOS 7

Prepare Environmental information for this articl...