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
已提問 7 個月前檢視次數 245 次
1 個回答
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
專家
已回答 7 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南