Mysql Workbench Error "Unknown File Encoding"

Asked

Viewed 771 times

3

I have a problem, I backed up my bank, however when loading the script in the MySQL Workbench, I get a message saying: "Unknown File Encoding"

inserir a descrição da imagem aqui

If I choose utf8 get this message:

inserir a descrição da imagem aqui

I can only open it if I choose latin1, but then the accented characters are wrong, as for example: Sérgio Gomes

I do not know if it is due to some mistake of mine in the creation of the bank, problems with the tools, so if someone can help to properly configure the display of accented characters, I am grateful. Thank you.

  • 1

    This reply on Soen suggests this might be a Mysql Workbench bug: http://stackoverflow.com/a/12348391/540552 - You’ve tried the Heidisql?

  • I do not know, but I will check and put the result, Thank you.

  • @Rodrigo, how are you loading this file on Workbench?

2 answers

1

I had the same problem reported above and found out what happened in my case.

My backups were being coded correctly in utf-8. Until one day it started giving this error reported above.

I discovered that it was because I had just created a table that registered in a DOCUMENT field, which could be pdf, jpg, png... anyway.

The problem was this. It was not only registering the file name but the file itself. This was causing the error.

I deleted the record from the table and the backup worked perfectly.

Instead of saving the file in the bank, I put it in the bank to save only the file name and the path. The file is now stored on the server itself.

0

This depends on which encoding used to generate your backup, if you have not set the correct encoding to generate your backup you will experience accent problems. Note that in the mysql error message informs that your file is not UTF-8 (probably it must have been generated as latin), I suggest you to check which encoding is being used by your database, so run the following command in your database:

SHOW VARIABLES LIKE "character\_set\_database";

and re-generate your backup by specifying the encoding (this is an example of a backup using utf-8 as encoding):

mysql --default-character-set=utf8 -u root -p dbname -r dump.sql

Browser other questions tagged

You are not signed in. Login or sign up in order to post.