AMI Linux 2023 PDO MariaDB Error

0

I have an AMI Linux 2023 running with MariaDB. I can't make a PDO connection from my PHP script to my RDS running MariaDB. I followed this tutorial to Install LAMP 2023: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2023.html

The tutorial says to install following packages:

sudo dnf install -y httpd wget php-fpm php-mysqli php-json php php-devel

I assume that only

php-mysqli

driver was installed for PHP but not the PDO driver. I am kind of new to AWS. How can I install the PDO driver on my instance? I looked up all available packages here: https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.2.html. I located

php8.2-pdo

package. Do I just need to run

sudo dnf install -y php8.2-pdo

? Do I need to make additional changes after installation?

Luke
asked 7 months ago226 views
1 Answer
0

Hello.

What kind of error?
If it is a timeout error, there may be a problem with the network settings such as the RDS security group.
Please configure the inbound rules of the RDS security group to allow connections from EC2.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html

profile picture
EXPERT
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions