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
gefragt vor 7 Monaten245 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 7 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen