题描述:Navicat 为管理方便,连接Linux 中Mariadb失败,如下如下错误:Host '*' is not allowed to connect to this MariaDB server

解决方案:

//允许用户testuser从ip为222.129.1.1的主机连接到mysql服务器,并使用testpassword作为密码
MariaDB [(none)]> grant all privileges on *.* to 'testuser'@'222.129.1.1' identified by 'testpassword' with grant option;  
(若是允许所有ip:GRANT ALL PRIVILEGES ON *.* TO ‘testuser’@'%’ IDENTIFIED BY ‘testpassword’ WITH GRANT OPTION;)
MariaDB [(none)]> flush privileges;   //刷新权限缓存
MariaDB [(none)]> show privileges;
MariaDB [(none)]> show grants for  'testuser'@'222.129.1.1'

  

相关文章:

  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-09-07
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案