We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,628 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Chaging Collation of MYSQL 4.1.22

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

****

2
Contributors
1
Reply
3 Hours
Discussion Span
5 Months Ago
Last Updated
2
Views
divyakrishnan
Posting Whiz in Training
235 posts since May 2010
Reputation Points: 30
Solved Threads: 24
Skill Endorsements: 1

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

pritaeas
Posting Prodigy
Moderator
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0626 seconds using 2.68MB