We are dealing with this problem( https://www.cnblogs.com/abclife/p/11038660.html )The developer encountered the following error message when modifying the definer of the view at last:
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'
The database version is MySQL 5.7.25. Ask him to do the following:
>select user();
>select current_user() from dual;
>select host,user from mysql.user where user='root';
>show grants for root@'localhost';
>show grants for root@'%';
>select * from mysql.user where user='root';
The feedback said that there was nothing wrong with the user and the permission, and then asked the user to send the screenshot of the execution error again
root@localhost:information_schema 11:16:24>alter definer=`root`@`%` view <view_name> as select ...
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'
As you can see, it’s in information_ Schema database, switch to the database where the view is located, and execute the command again to execute correctly
Because of information_ Schema is a virtual database in which all tables are views. In fact, when importing data, there is no need to import information_ Schema.
Similar Posts:
- mysqldump Backup Error: mysqldump: Got error: 1449: The user specified as a definer (‘xxx’@’%’) does not exist when using LOCK TABLES
- ERROR 1044 (42000): Access denied for user ‘root’@’localhost’
- mysql ERROR 1044 (42000): Access denied for user ‘
- [Solved] MYSQL Error: django.db.utils.OperationalError: (1045:Access denied for user ‘root’@’localhost’ (using password: NO)
- MySQLAccess denied for user ‘root’@’localhost’ [How to Solve]
- [Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g
- mysql 1142 – SELECT command denied to user ‘root_ssm’@’localhost’ for table …
- The ‘INFORMATION_SCHEMA.GLOBAL_STATUS’ feature is disabled; see the documentation for …
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- [Solved] MYSQL Error: this authentication plugin is not supported