There is no 'root' @ '%' registered resolved

Source: Internet
Author: User

There is no 'root' @ '%' registered solves the problem of exporting a database from MYSQL on another machine and generating. the SQL file www.2cto.com is imported to my machine. after the SQL file, the following error occurs during database connection: "There is no 'root' @ '%' registered" solution: first, the above sentence means, no user named 'root' @ '%' exists. I understand a lot about this. Because the target MYSQL server you imported does not have this user, I recommend using the MYSQL visual management tool Navicat in the database, create a user named "%" on the corresponding user management, and then grant the corresponding permissions (note that the Management permissions of views and stored procedures are not granted by default) assign to this user. If you are typing on the console, check the mysql api .. In short, you can do the same thing as I mentioned above. Www.2cto.com PS: For this 'root' @ '%', this form is in the form of 'A' @ 'B'. It means that the password is correct, only when the IP address or domain name is B can the user name on the MYSQL server be used as the permission of. The 'root' @ '%' means that if the password is correct, anyone can use the permission of the MYSQL user named 'root', that is, the highest administrator permission. Funny solution: After studying it, I found that. there is a problem with the view and stored procedure statements on the SQL file. the statement for creating a VIEW in the SQL file is as follows: DROP VIEW IF EXISTS 'view name '; create algorithm = undefined definer = 'root' @ '%' SQL SECURITY DEFINER view' VIEW name 'AS select ...... See the red text. change % of all views and the red part of the stored procedure in the SQL file to localhost (or your machine's IP address), and then import this. SQL file.
 

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.