Error
Error Code:
3620
MySQL Error 3620: Rejected System View Access
Description
Error 3620 indicates that the MySQL server rejected an attempt to access a specific view within the `INFORMATION_SCHEMA` database. This typically happens when the user account or application connecting to MySQL lacks the necessary `SELECT` privileges to query system metadata, which is crucial for database introspection.
Error Message
Access to system view INFORMATION_SCHEMA.'%s' is rejected.
Known Causes
3 known causesInsufficient User Privileges
The MySQL user attempting to query the `INFORMATION_SCHEMA` view does not possess the required `SELECT` privilege for that view or globally.
Restricted Global Privileges
The MySQL server configuration or security policies might explicitly restrict global `SELECT` privileges, preventing access to system views for certain users.
Application User Misconfiguration
An application is attempting to connect and query with a MySQL user that has not been granted the appropriate `SELECT` permissions for `INFORMATION_SCHEMA` access.
Solutions
3 solutions available1. Grant SELECT Privilege on INFORMATION_SCHEMA easy
Explicitly grant the user the SELECT privilege on the INFORMATION_SCHEMA database.
1
Connect to your MySQL server as a user with sufficient privileges (e.g., root).
2
Execute the following SQL command, replacing 'your_user'@'your_host' with the actual username and host from which the error is occurring. If you want to grant it to all users on localhost, you can use 'your_user'@'localhost'.
GRANT SELECT ON INFORMATION_SCHEMA.* TO 'your_user'@'your_host';
FLUSH PRIVILEGES;
3
Verify that the user can now access the system views by attempting the operation that previously failed.
2. Review MySQL User Permissions medium
Check the existing privileges for the user to understand why access might be restricted.
1
Connect to your MySQL server as a user with sufficient privileges.
2
Use the SHOW GRANTS command to see the current privileges for the user.
SHOW GRANTS FOR 'your_user'@'your_host';
3
Examine the output for any explicit DENY statements or a lack of SELECT privilege on INFORMATION_SCHEMA. If necessary, use the GRANT command (as shown in Solution 1) to add the required permissions.
3. Temporarily Disable Information Schema Access Restrictions advanced
For debugging or specific scenarios, temporarily disable access restrictions on INFORMATION_SCHEMA.
1
Locate your MySQL configuration file (my.cnf or my.ini). The location varies by operating system and installation method.
2
Edit the configuration file and under the `[mysqld]` section, add or modify the following line:
[mysqld]
skip-information-schema
3
Save the configuration file and restart the MySQL server for the changes to take effect.
sudo systemctl restart mysql # Or equivalent command for your OS
4
After testing, it is strongly recommended to remove or comment out the `skip-information-schema` line and restart MySQL again to re-enable security. This is generally not a permanent solution.