Page 1 of 1

Connection to MySQL 3.23

PostPosted: 24. April 2013 14:59
by buonstefano
I'm currently migrating a server having ...

- Sun Solaris 5.10
- Xampp 0.9 with
- PHP 5.2.6 (cli) (built: Sep 25 2008 16:37:17)
- MySQL Ver 14.14 Distrib 5.1.44, for sun-solaris2.10 (sparc) using readline 5.1


... on a new hardware such ..

- Red Hat Linux 2.6.32
- Xampp 1.8.1 with
vega@eagtst1-->php --version
- PHP 5.4.7 (cli) (built: Sep 19 2012 11:23:02)
- MySQL Ver 14.14 Distrib 5.5.27, for Linux (i686) using EditLine wrapper


... on top of that I need to connect to a (remote) mysql database running with MySQL 3.23.45-log (that's out of my administration so that I cannot upgrade)

the problem that I have is that with (old) PHP 5.2.6 I don't have any problem in connecting to the remote database... both with mysql_connect() and mysqli_connect()
but with new installation PHP 5.4.7 the error given is "Connecting to 3.22, 3.23 & 4.0 is not supported. Server is 3.23.45-log"

Has support for very old MySQL engine been dismissed between PHP 5.2 and PHP 5.4
How can I solve the problem that I have?
Am I forced to downgrade PHP to 5.2 version on new machine to let it work (again) with MySQL 3.23?

Thanks in advance to anyone that can help me!

Best regards,
Stefano (Milan, Italy)

Re: Connection to MySQL 3.23

PostPosted: 24. April 2013 17:52
by Nobbie
buonstefano wrote:Has support for very old MySQL engine been dismissed between PHP 5.2 and PHP 5.4


Yes.

buonstefano wrote:How can I solve the problem that I have?


a) downgrade (as you mentioned already)

- or -

b) try to build your own PHP5.4 binary which still supports the old clients (you may choose between myslnd / libmysql / PDO_MySQL (only libmysql seems to support old MySQL 3.23). But this solution looks very difficult.

- or -

c) try to use "FEDERATED" storage engine. In that case, the connection to the "old" MySQL 3.23 is not established by PHP, but by MySQL itself. Your PHP script opens a local (newer) MySQL Database, you have to definie Tables with ENGINE=FEDERATED etc. see http://dev.mysql.com/doc/refman/5.1/en/ ... ngine.html for detailed documentation.

I dont know if this FEDERATED engine is a working solution for your problem and i dont know if FEDERATED tables are supported accross different MySQL Versions, but you should give it a try. If it works sufficiently, it is a nice solution, as you can keep your PHP 5.4 version.

Re: Connection to MySQL 3.23

PostPosted: 26. April 2013 12:33
by buonstefano
Ciao Nobbie,
I wasn't aware of the FEDERATED storage engine and it fully fits my needs.

Thanks for suggestion! Have a nice weekend!
Stefano