I'm migrating my files over to a new server and I'm getting this error message when I'm trying to connect to my database via PDO:
Connection failed: could not find driver
My credentials look like this:
"; fictitious IP address
$database = "";
The actual server where my site resides is a different IP address and when I engage my phpMyAdmin site, I notice that is also on a different IP address.
So, I've got three different IP addresses...
When I go to my server and look at the PHP info file, it looks as though I have everything I need to connect to a mySQL database:
PDO support enabled
PDO drivers mysql, sqlite
PDO Driver for MySQL enabled
Client API version mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
Directive Local Value Master Value
pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
On my php.ini file, I see this:
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; If mysqlnd is used: Number of cache slots for the internal result set cache
pdo_mysql.cache_size = 2000
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
Again, nothing is standing out as a possible explanation as far as why I'm getting the error.
Still, does the fact that I'm referring to a database on a different IP address and my phpMyAdmin is on a different IP - do those differences represent dealbreakers? In other words, if I'm reaching out to a different IP address for the database itself, is it that IP address that has to have the drivers?
Everything on my end appears to be OK, yet I still get that error.