Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Another easy way to convert database from Latin1 to UTF8
huuquynh
Join Date: Sep 2004
Posts: 23

by huuquynh huuquynh is offline 08 Jan 2010

I tried another way by searching some articles on vbulletin but it takes me long time, many steps, and not success... I found another way to do. I hope that my experiment can help someone is running a vbulletin for a long time with latin1, and now he want to convert to utf8.

After trying by myself offline some ways to convert database from latin1 to utf8, I see that there is a simple way: less steps and really easy, and no need special tool: iconv-chunk (if the database file is too big), uconv (database tools)...

First of all. Turn off your vbulletin board. And turn off httpd/apache service to dedicate all resources for database converting.


Next step: change mysql database server configuration.

Because the default of mysql database server is running at latin1 charset. So we need to change it to UTF8 by modify my.cnf and input more settings:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

After modified, restart mysql server for the changing affect...

Next step: dump the old database to file.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(this command will ask you type the db's password)

Next step: change charset from latin1 to utf8 in your dump file.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Next step: keep the old database for rescure if you do something wrong... create new database with charset utf8.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(this command will ask you type the db's password too)

Next step: import to new database.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Last step: Modify config.php.

Modify the new database to connect to in config.php.

And if you are using mysqli, go to the bottom of your config, you will see one line to un-comment.

That's all. I did by myself for my board with more than 100.000 members and 1.000.000 posts.

Goodluck! And remember that you should keep the original database for rescure if you do something wrong.

Quynh H Nguyen
Views: 6034
Reply With Quote
Comments
  #2  
Old 15 Jan 2010, 16:10
SeV3n SeV3n is offline
 
Join Date: Jan 2004
I'll try it for my forum too. Thanks.
Reply With Quote
  #3  
Old 25 Jun 2010, 19:21
Trajche Trajche is offline
 
Join Date: Aug 2009
What about the language encoding setting in vBulletin ? Did you change that too?

P.S.

I think you forgot the third slash here:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As it gives the error..

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Therefore the right line would be:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Am I on the right track here? Or completely off?

Last edited by Trajche; 25 Jun 2010 at 19:33.
Reply With Quote
  #4  
Old 09 Mar 2014, 21:13
dimitrisgr dimitrisgr is offline
 
Join Date: Aug 2012
Ηello...

I have the same problem but I have my own server and I can not make this change. There are other ways;;
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 11:05.

Layout Options | Width: Wide Color: