Running MySQL 5 as MySQL 4

I use MySQL 5 as the default database for the work that I usually do.

Today I came across a situation where I needed to test some MySQL 4 functionality.

An option was to install MySQL 4 on another port (not the standard 3306).

However, an easier option is to simply switch the MySQL mode.

/* show the current sql mode */

SELECT @@GLOBAL.sql_mode;

/* change the settings to mysql 4 mode */

/* the 'GLOBAL' keyword changes the mode for all clients  that connect from that time on */


More information can be found at:

2 thoughts on “Running MySQL 5 as MySQL 4”

Leave a Reply

Your email address will not be published. Required fields are marked *