1449 and 1045 exceptions occurred when connecting to MySQL. Solution: mysql1449

Source: Internet
Author: User

1449 and 1045 exceptions occurred when connecting to MySQL. Solution: mysql1449

How can I solve 1449 and 1045 exceptions when I connect to MySQL?

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

Import the SQL statement to the local machine, execute the stored procedure or view the video, and report the following error:

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

Permission issues: grant root all SQL Permissions

Mysql> grant all privileges on *. * to root @ "%" identified ". "; SQLException: The user specified as a definer ('book' @ '%') does not exist: solution grant all privileges on *. * to ebook @ "%" identified ". "; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) # Mysql

1045 exception during connection:

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

For mysql 5.6 and later versions, 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.

Enter flush privileges and refresh the database.

If you have any questions, please leave a message or go to the community on this site for discussion. Thank you for reading this article. Thank you for your support!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.