Hello,
I am getting “Unable to Connect to ‘stdb01’” on the task Configure LAMP server. Below are my setup:
DB Server:
sudo dnf install mariadb-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
CREATE DATABASE kodekloud_db7;
CREATE USER ‘kodekloud_aim’@‘stdb01’ IDENTIFIED BY ‘Rc5C9EyvbU’;
GRANT ALL PRIVILEGES ON kodekloud_db7.* TO ‘kodekloud_aim’@‘stdb01’ IDENTIFIED BY ‘Rc5C9EyvbU’;
FLUSH PRIVILEGES;
When testing with PHP , getting the below error:
PHP Warning: mysqli::__construct(): (HY000/1130): Host ‘stapp01.linux-lamp-stack-v2_db_net’ is not allowed to connect to this MariaDB server in /root/test.php on line 8
Connection failed: Host ‘stapp01.linux-lamp-stack-v2_db_net’ is not allowed to connect to this MariaDB server