rainloop-webmail icon indicating copy to clipboard operation
rainloop-webmail copied to clipboard

SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MariaDB server

Open Silverscott opened this issue 3 years ago • 2 comments

RainLoop version, browser, OS: Legacy Edition v1.17.0 / Chrome / Debian 11 Expected behavior and actual behavior: Connecting to my MySQL server / 127.0.0.1' is not allowed to connect to this MariaDB server Steps to reproduce the problem: Each time i try to setup the Stockage PDO in admin Panel Logs or screenshots: Screenshot : https://i.imgur.com/vHRTduR.png

Hello there, impossible to setup the database link

I tried with different database user but same error message SQLSTATE[HY000] [1130]

'rainloop'@'localhost' 'rainloop'@'127.0.0.1' 'rainloop'@'private IP' 'rainloop'@'Public IP'

Thanks for your help guys :)

Scott

Silverscott avatar Jan 08 '23 17:01 Silverscott

What are you trying to achieve in first place?

solracsf avatar Jan 11 '23 15:01 solracsf

Hi @Silverscott I suppose you have well created your database and set GRANT USAGE for the localhost.

I have this script that does that:

userRoot=root
passwordRoot="TODEFINE"
database=rainloop
user=rainloop
password="TODEFINE"

mysql --user=$userRoot --password=$passwordRoot <<EOF
CREATE DATABASE IF NOT EXISTS $database;
GRANT USAGE ON *.* TO "$user"@'localhost' IDENTIFIED BY "$password";
GRANT USAGE ON *.* TO "$user"@'%' IDENTIFIED BY "$password";
GRANT ALL PRIVILEGES ON $database.* TO $user@'localhost';
GRANT ALL PRIVILEGES ON $database.* TO $user@'%';
FLUSH PRIVILEGES;
SHOW GRANTS FOR $user@'localhost';
SHOW GRANTS FOR $user@'%';
EOF

Philippe34 avatar Jan 12 '23 16:01 Philippe34