Register Arama Bugünkü Mesajlar Mark Forums Read

Reply
 
Thread Tools
Another easy way to convert database from Latin1 to UTF8 Detaylar »
Another easy way to convert database from Latin1 to UTF8
 
TTayfun's Avatar
TTayfun
TTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant futureTTayfun has a brilliant future
Gerçek Ad: Tayfun T.
Kayıt Tarihi: Nov 2017
Mesajlar: 223

Güzergah: Istanbul Anadolu
Show Printable Version Email this Page
yazar TTayfun 28 Nov 2017, 15:32

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:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

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

Next step: dump the old database to file.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

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

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


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

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


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

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

Next step: import to new database.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

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

Source
Views: 56
Reply

Thread Tools

Posting Rules
Yeni konu açamazsınız.
You may not post replies
You may not post attachments
Mesajınızı düzenleyemezsiniz.

BB code is Açık
Smilies are Açık
[IMG] code is Açık
HTML code is Kapalı

Forum Atla


New To Site? Need Help?

All times are GMT +3. The time now is 13:39.

Tasarım Özelliği | Genişlik: Geniş Renk: Another easy way to convert database from Latin1 to UTF8 Another easy way to convert database from Latin1 to UTF8 Another easy way to convert database from Latin1 to UTF8 Another easy way to convert database from Latin1 to UTF8 Another easy way to convert database from Latin1 to UTF8