Error 1044: Access denied for user ‘syz-remote’@‘%’ to database ‘webapp’
Cause: I was testing the code of golang
connecting to the database. I finally reinstalled MySQL
and set up remote login, but this problem still occurred.
My SYZ-remote
account is specially created for remote login. Therefore, unlike the root
user, it does not have the due permission. We need to set its permissions in MySQL
.
View MySQL
account permissions through this code
mysql> SELECT host,user,password_expired,Grant_priv,Super_priv FROM mysql.user;
+-----------+------------------+------------------+------------+------------+
| host | user | password_expired | Grant_priv | Super_priv |
+-----------+------------------+------------------+------------+------------+
| localhost | root | N | Y | Y |
| localhost | mysql.session | N | N | Y |
| localhost | mysql.sys | N | N | N |
| localhost | debian-sys-maint | N | Y | Y |
| % | syz-remote | N | N | N |
+-----------+------------------+------------------+------------+------------+
5 rows in set (0.00 sec)
You can see that the permission of Grant_priv and Super_priv
in syz-remote
is N
We gave him authority
update mysql.user set grant_priv = 'Y', Super_priv='Y' where user = 'syz-remote';
Refresh it again
flush privilegs;
Read More:
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- After installing mysql5.7 on centos7, an error 1045 (28000) is reported: access denied for user ‘root’ @’localhost ‘(using PAS)
- [Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘
- [Solved] Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- Mysqldump: Got error: 1045: Access denied for user ‘root‘@‘localhost‘
- [Solved] mysql 2003 remote access failed mysql8 configure remote access
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- Mysql 8.0.13 Enabling remote access (ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th)
- [Solved] mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this opera
- Docker: How to Solve MYSQL8 & Navicat remote connection error
- Database mirroring connection error 4’An error occurred while receiving data: ‘10054(An existing connection was forcibly closed by the remote host.)
- [Solved] ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
- [Solved] C# connecting to MySQL database reports an error
- Zabbix import MySQL database error ERROR 1046 (3D000) at line 1: No database selected
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- mysql ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63] Permission denied (publickey,gssapi-ke
- Using Mybatis to connect to the database error: Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver···