Backup and restore the MySQL character set (collation)

Version 1.43

Feature
Finished

mysql >4.1.1: SHOW VARIABLES LIKE 'character_set%'; gives list. The db.opt file only exists in 4.1.1, so likely won't have this option for mysql 4. mysql 5: SHOW CHARACTER SET SHOW COLLATION Reference: http://www.databasejournal.com/features/mysql/article.php/3638426 MySQL 4 may not support this function. Related: http://stackoverflow.com/questions/4948356/query-to-show-all-tables-and-their-collation Also store the collation info in the backup and set it at restore time: DONE. Saved into the dbname.conf all db_collation=, with the entire row, eg: SELECT * FROM information_schema.SCHEMATA WHERE schema_name=dbname Data saved into the backup/username_dbname.conf in the tar.gz backups. Sample: db_collation=CATALOG_NAME=&DEFAULT_CHARACTER_SET_NAME=latin1&DEFAULT_COLLATION_NAME=latin1_swedish_ci&SCHEMA_NAME=mysqluser_sixchr&SQL_PATH= DA will remove the db_collation before the restore, else it would try to add username_collation as a new User.. which is often too long for MySQL (16 character cap).

Interested to try DirectAdmin? Get a 30-day Free Trial!