连接到远程 mysql 数据库 - aws 服务器
Connecting to remote mysql database - aws server
我在 mysql 数据库中创建了一个这样的用户:
create user 'remote'@'localhost' identified by 'myUserPassword';
grant all on *.* to 'remote'@'localhost';
flush privileges;
create user 'remote'@'%' identified by 'myUserPassword';
grant all on *.* to 'remote'@'%';
flush privileges;
当我尝试使用 heidi 访问它时,我遇到了这个问题。我以前这样做过,我可以使用我新创建的远程帐户轻松访问其他服务器。服务器在 AWS 上。我正在通过 SSH 隧道连接它。
我也查了数据库
select * from user \G;
我也可以看到权限
*************************** 7. row ***************************
Host: %
User: remote
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: N
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: i_have_removed_it_the_password
password_expired: N
password_last_changed: 2021-02-08 07:13:59
password_lifetime: NULL
account_locked: N
*************************** 8. row ***************************
Host: localhost
User: remote
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: N
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: i_have_removed_it_the_password
password_expired: N
password_last_changed: 2021-02-08 07:13:59
password_lifetime: NULL
account_locked: N
数据库是mysql,我选择的是mariadb的dll。这就是我让它发挥作用的方式。
我在 mysql 数据库中创建了一个这样的用户:
create user 'remote'@'localhost' identified by 'myUserPassword';
grant all on *.* to 'remote'@'localhost';
flush privileges;
create user 'remote'@'%' identified by 'myUserPassword';
grant all on *.* to 'remote'@'%';
flush privileges;
当我尝试使用 heidi 访问它时,我遇到了这个问题。我以前这样做过,我可以使用我新创建的远程帐户轻松访问其他服务器。服务器在 AWS 上。我正在通过 SSH 隧道连接它。
我也查了数据库
select * from user \G;
我也可以看到权限
*************************** 7. row ***************************
Host: %
User: remote
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: N
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: i_have_removed_it_the_password
password_expired: N
password_last_changed: 2021-02-08 07:13:59
password_lifetime: NULL
account_locked: N
*************************** 8. row ***************************
Host: localhost
User: remote
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: N
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Create_user_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: i_have_removed_it_the_password
password_expired: N
password_last_changed: 2021-02-08 07:13:59
password_lifetime: NULL
account_locked: N
数据库是mysql,我选择的是mariadb的dll。这就是我让它发挥作用的方式。