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
[root@localhost 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
[root@localhost 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:
[root@localhost 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
[root@localhost 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
[root@localhost 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:
- Mysqldump: Got error: 1045: Access denied for user ‘root‘@‘localhost‘
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- [Solved] Error 1044: Access denied for user ‘syz-remote‘@‘%‘ to database ‘webapp‘
- [Solved] mysqldump: Got error: 1556: “You can‘t use locks with log tables.“ when using LOCK TABLES
- [Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘
- After installing mysql5.7 on centos7, an error 1045 (28000) is reported: access denied for user ‘root’ @’localhost ‘(using PAS)
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- [Solved] Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- Mysql 8.0.13 Enabling remote access (ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th)
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- Solve ERROR 1136 (21S01) in Mysql: Column count doesn’t match value count at row 1
- mysqldump: Error: Binlogging on server not active [How to Solve]
- [Solved] mysql 2003 remote access failed mysql8 configure remote access
- [Solved] mysqldump Command Error: Got error: 2002: “Can‘t connect to server on ‘127.0.0.1‘ (36)“ when trying to connect
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- MYSQL Slave is not configured or failed to initialize properly. You must at least set –server-id
- mysql ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin
- [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63] Permission denied (publickey,gssapi-ke
- [Solved]Error 1054 (42s22): unknown column ‘password’ in ‘field list’ how to modify the password