1,105,447 Community Members

Chaging Collation of MYSQL 4.1.22

Member Avatar
divyakrishnan
Posting Whiz in Training
243 posts since May 2010
Reputation Points: 20 [?]
Q&As Helped to Solve: 24 [?]
Skill Endorsements: 4 [?]
 
0
 

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

****

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

Your syntax appears correct, are you sure utf8 is installed?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article