mysqli_connect_errno() returns 1251 in Eclipse PDT with Zend Debugger

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am learning PHP5 and MySQL. I installed Eclipse PDT with Zend Debugger.
I created website containing the following function to open connection
with MySQL database:

function openOgloszeniaDB() {
    global $db, $websiteRoot;
    $password = file_get_contents("$websiteRoot/
    $db = new mysqli('localhost', 'ogloszeniowiec', $password,
    if (mysqli_connect_errno()) {
        $db = null;
        return false;
    @$db->query('SET NAMES utf8;');
    return true;

The problem is that mysqli_connect_errno() returns 1251 (Client does not
support authentication protocol requested by server; consider upgrading
MySQL client). The problem occurs only in Eclipse PDT while debugging;
when I open my website in a browser, everything is OK.
I use:
    PHP Version 5.2.6-2ubuntu4.1
    mysql  Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (i486)
using readline 5.2
    mysqli Client API library version     5.0.67
    mysqli Client API header version     5.0.67
Here is contents of /opt/eclipse/plugins/
Should I do more configuration?
Please help!

Re: mysqli_connect_errno() returns 1251 in Eclipse PDT with Zend Debugger

Jivanmukta wrote:
Quoted text here. Click to load it

This is a MySQL problem (hint: your message came from MySQL), so you
should be starting your troubleshooting there.  Maybe the MySQL
reference manual for your error code will help.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline