Upgrading MySQL on Windows
1. Stop Service
shell> NET STOP MySQL
2. Remove Service
shell> C:\mysql\bin\mysqld --remove
3. Backup and unzip install package
4. Configure my.ini
Example: Add character-set
[mysqld] character-set-server=big5 [client] default-character-set=big5
5. Try to Run
mysqld --defaults-file="C:\mysql\my.ini"
6. Install Service
shell> C:\mysql\bin\mysqld --install MySQL --defaults-file=C:\mysql\my.ini
7. fix_privilege
linux:
mysql_fix_privilege_tables root_password
win32:
C:\> cd "C:\Program Files\MySQL\MySQL Server 4.1"
C:\> bin\mysql -u root -p mysql
mysql> SOURCE scripts/mysql_fix_privilege_tables.sql
8. check table
CHECK TABLE after upgrade
Change
MySQL 4.0 ---> MySQL 4.1
-
Character Sets: mysql-4.1: utf8, mysql-4.0: latin1 (trash your data)
解決方式: ALTER TABLE table 有所要的 charset 先 - old-passwords Configure (the user table so that it can hold long password hashes)
- default-storage-engine=INNODB
-
If you have created or used InnoDB tables with TIMESTAMP columns in MySQL versions 4.1.0 to 4.1.3, you must rebuild those tables when you upgrade to MySQL 4.1.4 or later.