Page 1 of 1

0.9.1 and MySQL 5.0.16

Posted: Fri Dec 16, 2005 11:12 am
by joho
I just moved my S9Y-blog from a MySQL 4.0.x-server to MySQL 5.0.16 and got this:

Code: Select all

Query failed:

SELECT 
                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,
                    [..]

 / No database selected
I have changed nothing else, except for the hostname in the S9Y configuration file?!?!

PHP 4.4.1 is running on the server, with the MYSQL-extensions (not MYSQLI) compiled into it (from the MySQL 5-client library of course).

Re: 0.9.1 and MySQL 5.0.16

Posted: Fri Dec 16, 2005 11:19 am
by garvinhicking
You should use mysqli if connecting to MySQL > 4.1.

Regards,
Garvin

Posted: Fri Dec 16, 2005 11:23 am
by joho
How does that matter?
I run on a host with only MySQL-extensions installed, not MySQLI.
I mean, S9Y must be doing something it shouldn't if it doesn't work all of a sudden, no?

I have moved other applications and they work fine, without utilizing the MySQLI extensions.

Posted: Fri Dec 16, 2005 11:44 am
by joho
And getting MYSQLI and MYSQL extensions both to work with PHP 4.4.1 is no problem? When compiled with MYSQL 5.0.16 client libraries?

Posted: Fri Dec 16, 2005 11:55 am
by joho
From the PHP manual, a user comment:
jedifreeman at comcast dot net
21-Mar-2005 10:49
It should be noted here that mysqli is a PHP 5 only extension.

Posted: Mon Dec 19, 2005 9:15 am
by garvinhicking
Okay, my experience was that connecting to MySQL 5 with the usual mysql library exposes problems.

The error you're getting somes because serendipity is not able to "select" (use) your database. That can happen if:

1. Your serendipity_config_lcaol.inc.php file contains an empty dbName parameter

2. Your user account does not have privileges on the user account

3. Your mysql library is broken and cannot properly issue a mysql_select_db() call

At least those are the 3 things that instantly come to my mind...

HTH,
Garvin

Posted: Mon Dec 19, 2005 9:40 am
by joho
Do you think it helps if, when moving from one MySQL-server to another, I set-up the proper privileges for the S9Y-user? :oops:

Duh! :shock:

Everything works; so it's now PHP 4.4.1, MySQL 5.0.16-client libraries talking with a MySQL 5.0.16 server; using the MySQL-extension in S9Y.

Posted: Mon Dec 19, 2005 9:42 am
by garvinhicking
Yay, great we solved it. Sorry it took so long, I really thought it were mysqli related! :(

Regards,
Garvin