Things to watch for when going to 4.1

interfasys

Verified User
Joined
Oct 31, 2003
Messages
2,100
Location
Switzerland
Things to watch for when going to MySQL 4.1

I've recently upgraded mysql on a server and here are some oddities I ran into.

-Table definitions have changed. Somehow the size of VARCHAR was adjusted to the larger stored value (or sometimes to something that doesn't make sense). This breaks a lot of scripts which would want to store larger sets of data.
-There are some charset problems if you import data from another version. You have to make sure that your scripts understand utf-8 or that you create a table with the charset you want it to use. Usually Latin1.

Maybe more things?
 
I believe it's possible to change the way timestamps are generated by setting it in my.cnf.


Other thing to watch for if you use a DB that has been converted to UTF-8 and if you use PHP. You have to lset the connection to utf-8.

PHP:
$res = mysql_connect(MYSERVER,MYLOGIN,MYPASSWORD);
mysql_query("SET NAMES 'utf8'", $res);
 
Oliver,

Any luck getting those timestamps to default to the old standard? You mention using /etc/my.cnf. What did you use in there?

Big Wil
 
I didn't change it myself, but if you check the mysql doc, you'll see that a lot of vsriables can be set in my.cnf or at connection time. The manual gives an example.
 
I have been all through it. Everything states that it can't be changed. The only system variable for timestamp is a session and not a global variable so that can't even be set there.

I just figured since you mentioned it that you had tried it. Doesn't look like it is possible then.

Big Wil
 
IIRC, you can set the TIMESTAMP format of a column, so if you you do that for the table that stores the timestamp, you should be able to store the values correctly.
 
The default value for a timestamp is this:
%Y-%m-%d %H:%i:%s

You can change it by playing with the "datetime format" variable.
 
Ok I am getting this on my server that runs mysql 4.1

Create new Database <-- link
phpMyAdmin <--- link
Error connecting to MySQL: Client does not support authentication protocol requested by server; consider upgrading MySQL client <--- error normally blank area


Things I have done.

1 - in /etc/my.cnf added.

[mysqld]
old_passwords

2 - Started daemon with --old-passwords switch.

3 - Recompiled php specifying the new mysql client and enabling all mbstrings.

I havent done anything regarding character sets and timestamps, do I need to do these to make directadmin work with 4.1?

As previously stated I have got all normal php apps such as phpmyadmin working fine.
 
I have done the opposite.

Everything is standard 4.1 including passwords (the only change is that I compiled it so that it uses utf-8 all the way instead of having to define that in my.cnf).

The only thing to do (while we wait for DA to finally fix this) is to set a password for the da_admin user using the old password format.

JBMC Software had said they would upgrade the DA client to be able to use new passwords, but I guess that they have forgotten...
 
Last edited:
Sweet thats done it, ressetting the password so it was saved in the old format.
 
Back
Top