Cannot connect to MySQL Database with MDB2 (Error not Found)

4.3k views Asked by At

In first point. I am absolutely a noob in PHP and PEAR. For exercising I have worked with PHP, Pear and Mondial DB of Oracle offline, but now I wanted to connect to my Database on 1and1.com.

Following I have tried:

$dsn = 'mysql://[email protected]/db5235xxxxx'; //Have it tried with password too and many other variations    
$sql = "SELECT * FROM Vereine";  
$db = MDB2_Util::connect($dsn);

If I upload this file on my webserver and when I try to call this page, I get an error.

Fehler beim Verbindungsaufbau mit [mysql://[email protected]/db5235xxxxx] : MDB2 Error: not found

The error Message:

"Fehler beim Verbindungsaubau" is an own deinied Message in MDB2_Util.

If I try to connect with MDB2::connect, then the Message calls only:

MDB2 Error: not found

What can be the Error? Why it doesnt show the real Error or a helpful hint. Can I debug? If yes, how?

Best Regards Benny

1

There are 1 answers

0
Ben Johnson On

This can occur even if you have installed an MDB2 driver, but PHP can't find or can't read it.

As a practical example, I experienced this problem on a system on which the UMASK value had been changed from 022 to 027. Even though the MDB2 driver had been installed (with root privileges), the user under whom php-fpm was running lacked access to the library's files.