Knowledge Base   /   MYSQL

Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server

Posted on 18 January 2023 01:42 pm

1a) Connect to mysql (via localhost)

mysql -uroot -p
  1. Create user

    CREATE USER 'user'@'%' IDENTIFIED BY 'password';

  2. Grant permissions

    GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION;

  3. Flush privileges

    FLUSH PRIVILEGES;

 

Although /etc/mysql/mysql.conf.d has these lines: comment it

#bind-address        = 127.0.0.1

Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server - Stack Overflow

Sometime, just need to updrade Workbench if you use it to access MYSQL.