Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Closed Points: 200 Time: 06:17 - Feb 16, 2007
jgivoni
I am having trouble with an .sql file containing a backup of a database which will be used to restore the database daily. The way I am executing the restore process is by using the mysql command (batch mode - linux shell): mysql < origdata.sql This works perfectly if the .sql file itself is encoded with default (ISO-????) character set, but when working with more exotic languages I have to use UTF-8. Saving the file in UTF-8 encoding is not working, since mysql doesn't know that it is UTF-8 and interprets it as default encoding, thus messing up a lot of forreign characters. My question is, if there is a way to let mysql know that this file should be interpreted as UTF-8? Either by 1) specifying the encoding on the command line 2) specifying the encoding within the file 3) specifying the encoding at filesystem level (I am not so clear here, but something like headers for http) Note that this problem has nothing to do with the charset or collation of the database itself, nor with the database connection (these all work perfectly with UTF-8) only the command line import utility. Please come forward if you know anything about this! Jakob
Categories:
Add Categories
When adding more than one category, separate them with commas.
mail
Date:: Mar 13, 2007
Time:: 10:15
mysql -h host -u username -p password -default_character_set utf8 database < file.sql cheers
Date:: Mar 15, 2007
Time:: 04:32
Thanks! That command line parameter actually works - well, you have to use double dash (--) like this: mysql -h host -u username -p password --default_character_set utf8 database < file.sql Silly me hadn't tried it before because I'd read in a forum that it only applies to the connection and the database - not the file :-) Maybe that was true in a previous version of mysql... Now it works!
RABINGHOSHNTPL
Date:: Apr 06, 2010
Time:: 11:24
.SQL DATA IMPORT PROBLEM. HOW TO IMPORT .SQL TABLE IN DATABASE.
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
whats the best food to eat during midnight?
How to identify the tiffany jewelry? www.tffanycheapmall.com.
Send an email alert to each user of the php application based on criteria
How I Increased My AdSense Earnings?
how to choose the lady dress ?
How can I fulfill the minimum requirement to make your computer support 3D?
You have 100 characters to use
Rank
Expert
Points
1.
10354
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software