Problem: back up the database on centos7 of the virtual machine, and an error occurs when executing mysqldump: error: ‘access denied; You need (at least one of) the process privilege (s) for this operation ‘when trying to dump tablespaces
[[email protected] backup]# sh ./mysql_backup.sh
Start exporting the database...
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
The export was successful and the file name is : /data/backup/mysql/2021-10-06_003536.sql.gz
Solution: log in to MySQL with the root account in CentOS
[[email protected] backup]# mysql -uroot -p
Input password
Then execute the command
mysql> GRANT PROCESS ON *.* TO 'demo'@'localhost';
This demo should be changed to your own login database account
Then refresh the database
mysql> flush privileges;
All execution processes:
[[email protected] backup]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 61
Server version: 8.0.24 Source distribution
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT PROCESS ON *.* TO 'demo'@'localhost';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
[[email protected] backup]# sh ./mysql_backup.sh
Start exporting the database...
The export was successful and the file name is : /data/backup/mysql/2021-10-06_003815.sql.gz
[[email protected] backup]#
This method is accessed locally by the user
Another method is to change localhost to% by using the global access command
mysql> GRANT PROCESS ON *.* TO 'demo'@'%';
Similarly, change the demo to your own MySQL login account, and then execute the above command to refresh the database
I used the first method.
Read More:
- [Solved] MYSQL Error: unknown error 1130, unknown error 1045
- Mysql8.02/ubuntu 20 ERROR 1449 (HY000) [How to Solve]
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- [Solved] Error 1044: Access denied for user ‘syz-remote‘@‘%‘ to database ‘webapp‘
- [Solved] there are special symbols in the initial password for installing MySQL in Hadoop, and an error is reported
- [Solved] There is a problem with mysql8.0 without password in Navicat connection
- Idea connect mysql error Server returns invalid timezone. Go to’Advanced’ tab and set’serverTimezone’ property
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- [Solved] Sqlyog always reports an error when creating a new connection.
- [Solved] mysql 2003 remote access failed mysql8 configure remote access
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- Ubuntu ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (111)
- MySQL Error: errorCode 1130, state HY000 [How to Solve]
- [Solved] ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
- Mysql 8.0.13 Enabling remote access (ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th)
- Docker mysql8 modify password
- [Linux Docker Mirror] MYSQL Run sql Script Error: Failed to open file ‘/home/mydatabase.sql‘, error: 2