Import sql file to mysql database keeping special characters

时间:2017-07-12 08:14:18

标签: mysql sql database encoding special-characters

Well I'm migrating a database to another with a different structure so I have made big files with queries like

'Insert into comment values (1,'comment','user');

by taking the info from first database through a php file.

I cannot import them with phpmyadmin because they are too big, so I'm trying to use the shell and the command

source path-to-file.sql

And everything works fine but as some data is in spanish I need to keeps special characters like ó or ñ, but it converts them into "??"

Does anybody know how can I fix it? Thank you.

0 个答案:

没有答案