How to change collation of a mysql table which is created on MYSQL 4.1.22 ?
I used following query

ALTER DATABASE  `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

ALTER TABLE  `testtab` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

It displaying following error messages

****Error

SQL query:

    ALTER DATABASE `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

MySQL said: Documentation

    #1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1








Error

SQL query:

    ALTER TABLE `testtab` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

MySQL said: Documentation

    #1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1 

****
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.