Hello,
I'm having trouble connecting to my SQL database from my Centos 7 VPS. I have tried using both mysqli and PDO, both are returning permission denied. I have copied the connection string from an identical OVH system and checked everything hundreds of time but I keep getting permission denied. I have managed to connect via phpmyadmin and through TablePlus with no issues, I just can't acccess via php.
The VPS ip is whitelisted and the user account has been granted administrator for all databases. I have also tried using the SFTP account and still, permission denied. If anyone has any pointers on what to check that would be great. Thanks.
Virtual Private Servers - PHP 8.0.27 SQL Permission Denied (can connect via other clients)
Related questions
- Installing Operating System from custom image on OVH VPS ( CentOS 8 Tutorial)
55542
11.01.2020 21:11
- SMTP server on VPS and port 25 opening
46219
10.12.2025 13:59
- Mumbai VPS data-center availability
44061
23.12.2025 04:48
- Nameserver for my vps
43500
07.08.2018 11:35
- Remote access to MySQL database
42342
16.01.2018 15:29
- VPS stuck in “Saving…” for over 24 hours – No SSH, No KVM, No Rescue
40202
10.01.2026 22:36
- Advice on products to run a simple website + CMS.
37367
07.01.2026 14:58
- VPS login and password not accepted. Reboot in Rescue Mode results in root and temp password not being accepted
35116
15.01.2026 20:04
- Redirect domain to vps
35098
03.01.2018 22:32
- Change server location
35037
06.11.2020 10:16