The user specified as a definer (' root ' @ '% ') does not exist

Source: Internet
Author: User

The user specified as a definer (' root ' @ '% ') does not exist This type of error is mainly caused by access to the view file (no permissions)

Workaround:

2. Before you enter the MySQL installation path, make sure that your MySQL service is turned on;

Enter the mysql-hlocalhost-uroot-p password in the DOS command window

Analytical:::

In the DOS command window input mysql-hlocalhost-uroot-p Enter the MySQL database ,

Where- h indicates the server name, localhost indicates local;

- u is the database user name, root is the MySQL default username;

- p for the password, if the password is set, you can directly after- p link input, such as:-p123456, the user does not set the password, display enter password, directly enter.

Note that if your MySQL is not installed in the C drive, you will need to use the DOS command to go to the bin directory in the MySQL installation directory.

The method is as follows: input D: Enter D, enter CD D:\Program Files (x86) \mysql\mysql Server 5.7\bin into the bin directory of MySQL can input mysql-h Localhost-uroot-p

3. Add permissions to MySQL

Analytical::::

Permissions issue, Grant root all SQL permissions

Mysql>Grant all privileges on * * to [e-mail protected] "%" identified by ".";
Query OK, 0 rows Affected (0.00 sec)

Mysql> flush Privileges;

Query OK, 0 rows Affected (0.00 sec)

The user specified as a definer (' root ' @ '% ') does not exist

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.