August 14, 2013 at 8:20 am #13050
When I restore a datebase with “Import -> Execute SQL script…” command through HTTP tunneling, the accented characters do not appear correctly.
The first 472 row is correct, but from 473 the `data` field's contents are “ÃrvÃztÅ±rÅ‘ tÃ¼kÃ¶rfÃºrÃ³gÃ©p” instead of “Árvíztűrő tükörfúrógép”.
I think the problem is because of the “SET NAMES utf8” command.
I've attached the import SQL file, what also has created by SQLyog.
August 14, 2013 at 9:30 am #34460
What is the SQLyog version and the MySQL server version you are using?
August 14, 2013 at 9:33 am #34461
MySQL version: 5.1.66-0+squeeze1
SQLyog Ultimate: 11.21 (32 bit)
August 14, 2013 at 9:41 am #34462
ok .. we will check.
But please tell: if you try multiple times does this happen always and at exactly the same row?
August 14, 2013 at 10:01 am #34463
When import in progress, the “Query(s) execute” counter wait a second at 749 value.
So I think this is the first datapacket, that SQLyog send the MySQL through HTTP tunnel.
Maybe it depend on these server system variables:
character_set_server = latin1
collation_sever = latin1_swedish_ci
August 14, 2013 at 10:32 am #34464
We SET NAMES UTF8. But it fails after some point.
I will not guess more now. We will need to check in a similar environment..
August 30, 2013 at 8:45 am #34465
I have modified few things in SQLyogTunnel.php file:
It store the current charset into cookie before mysql_close. After mysql_connect it checks and set last charset from cookie.
I know it is just temporary solution, but now it's seem to me Execute SQL script command works correct.
I've attached the file to this post.
August 30, 2013 at 10:27 am #34466
OK .. thanks for the patch. We will check this.
But please tell what SQLyog version you are using? Are you sure that such patch is required with a recent SQLyog version?
August 30, 2013 at 10:49 am #34467
My SQLyog version is 11.23.
The error occurs, when the “character-set-server” value of MySQL is not the same as “set names” command in import file.
My sharacter-set-server=latin1(from my.cnf)
When SQLyog send the first datapacket to server from import file, the “set names” commad set the charset to utf8 (File: import.sql.text, LineNo: 7).
When the second datapacket is sent there is not “set names” command in sql queries. So the connection charset will be default (latin1).
My patch improve the operation, but it's not perfect, because of using cookies.
September 10, 2013 at 11:53 am #34468
You must be logged in to reply to this topic.