Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] MySQL encoding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kaksi
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2004
Posts: 125

PostPosted: Fri Dec 30, 2005 1:27 pm    Post subject: [SOLVED] MySQL encoding Reply with quote

Hi!

My servers motherboard stopped working a few days ago. I reinstalled gentoo on another server and just moved the disk from the old server to the new. Ofcource I had no backup of the database so I thought I would just be able to move the databases in /var/lib/mysql from the disk in the old server to the new one.

The problem is that the old server was iso-8859-1 (i guess) and the new is utf-8. MySQL seems to have some problems with this since I get this from the log:

Code:

051230 14:35:18 [Warning] './gbgonline_net/forum_forum_tracker' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed


I have many more of these warnigns... How could I fix this? or is there a better way to get the data from the old harddrive than just copy the db files?


Last edited by kaksi on Sat Dec 31, 2005 1:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
martin.k
Guru
Guru


Joined: 28 Nov 2004
Posts: 493
Location: Wylatowo, Polska

PostPosted: Fri Dec 30, 2005 1:52 pm    Post subject: Reply with quote

Use mysqldump instead of copying db files.
And if you are not familiar with console :) use some mysql tools like mysql-administrator.
From MySQL 4.1 there are some changes in database, table names encoding - default UTF-8
So that's your problem. You have db with iso table names encoding and the MySQL engine wants UTF-8.
Best you can do is dumping your db with above mentioned tools and import it back on the new install.
_________________
linux-2.6.17 +ck +R4 +lockless +genetic-as +... więcej nie pamiętam :)
LRU #299256
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri Dec 30, 2005 4:04 pm    Post subject: Reply with quote

Moved from Unsupported Software to Other Things Gentoo.

EDIT: MySQL tends to fall under the Networking portion of N&S. --pjp
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
kaksi
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2004
Posts: 125

PostPosted: Sat Dec 31, 2005 1:24 pm    Post subject: Reply with quote

The problem was that the mysql server was not runnign anymore... I just had acces to the physical disk. But I solved it anyway. I managed tp boot from the disk, dump the db and import it.

Thanks anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum