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

9 great JavaScript framework scripts for drawing charts on the web

9 great JavaScript framework scripts for drawing ...

mysql5.7.19 winx64 decompressed version installation and configuration tutorial

Recorded the installation tutorial of mysql 5.7.1...

How to implement import and export mysql database commands under linux

1. Export the database using the mysqldump comman...

Summary of data interaction between Docker container and host

Preface When using Docker in a production environ...

【HTML element】How to embed images

The img element allows us to embed images in HTML...

Summary of MySQL composite indexes

Table of contents 1. Background 2. Understanding ...

Interpretation of the module for load balancing using nginx

Table of contents Two modules for using nginx for...

How to make spaces have the same width in IE and FF?

body{font-size:12px; font-family:"宋体";}...

Detailed explanation of how to use the canvas operation plugin fabric.js

Fabric.js is a very useful canvas operation plug-...

MySQL data insertion efficiency comparison

When inserting data, I found that I had never con...

HTML web page image tag

Insert image tag <IMG> The colorful web page...

How to open ports to the outside world in Alibaba Cloud Centos7.X

In a word: if you buy a cloud server from any maj...

How to track users with JS

Table of contents 1. Synchronous AJAX 2. Asynchro...