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

Vue routing lazy loading details

Table of contents 1. What is lazy loading of rout...

Solving problems encountered when importing and exporting Mysql

background Since I converted all my tasks to Dock...

How to add automatic completion commands for docker and kubectl on Mac

Introduction to kubectl kubectl is a command line...

How to view nginx configuration file path and resource file path

View the nginx configuration file path Through ng...

How to upgrade all Python libraries in Ubuntu 18.04 at once

What is pip pip is a Python package management to...

MYSQL string forced conversion method example

Preface Since the types of the same fields in the...

Summary of essential Docker commands for developers

Table of contents Introduction to Docker Docker e...

Install and deploy java8 and mysql under centos7

Generally, learning Java and deploying projects a...

MySQL database Load Data multiple uses

Table of contents Multiple uses of MySQL Load Dat...

Vue3 gets the current routing address

Correct answer Using useRouter : // router path: ...

React Fragment Introduction and Detailed Usage

Table of contents Preface Motivation for Fragment...

Let's talk about the characteristics and isolation levels of MySQL transactions

The Internet is already saturated with articles o...

js precise calculation

var numA = 0.1; var numB = 0.2; alert( numA + num...

Use of Linux relative and absolute paths

01. Overview Absolute paths and relative paths ar...