NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql and mysqli together (with PHP 5.0.3)

Hans Zaunere hans at nyphp.com
Fri Dec 24 14:47:28 EST 2004


> I upgraded to MySQL 1.4.8. It's installed in /usr/local/mysql and I
can
> connect with it just fine via the command line.

MySQL 4.1.8, right? :)

> The PHP docs say:
> 
> "To install the mysqli extension for PHP, use the
> --with-mysqli=mysql_config_path/mysql_config  configuration option
where
> mysql_config_path represents the location of the mysql_config program
that
> comes with MySQL versions greater than 4.1.
> 
> "If you would like to install the mysql extension along with the
mysqli
> extension you have to use the same client library to avoid any
conflicts."
> 
> Dumb question:  so what configure options should I use if I want to
> compile in support for both the old mysql and the new mysqli APIs and
> ensure that they are using the same client library?
> 
> What I've done is used '--with-mysql=/usr/local/mysql' as well as
> '--with-mysqli=/usr/local/mysql/bin/mysql_config' and I guess that
wasn't
> too smart. mysqli is working but when I try mysql_xxx(), all kinds of
> weirdness happens.

>From an initial take, that should do it.

Depending exactly on the weirdness you're seeing, it could be related to
the new authentication protocol and passwords MySQL 4.1.x uses by
default.

Overview:
http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html

Possible this:
http://dev.mysql.com/doc/mysql/en/Upgrading-grant-tables.html

Most likely this:
http://dev.mysql.com/doc/mysql/en/Old_client.html


---
Hans Zaunere, Sales Engineer
MySQL, Inc.  www.mysql.com
Office: +1 212.213.1131

Are you MySQL certified?
www.mysql.com/certification

President, Founder
New York PHP
http://www.nyphp.org





More information about the talk mailing list