MySQL Workbench Error "Unknown File Encoding"

3

I have a problem, I backed up my database, however when I load script into MySQL Workbench , I get a message saying: "Unknown File Encoding"

IfIchooseutf8Igetthismessage:

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

I do not know if it's due to some mistake in my bank creation, problems with the tools, so if anyone can help to correctly configure the display of the accented characters, I'm grateful. Thank you.

    
asked by anonymous 26.06.2016 / 09:48

2 answers

1

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

My backups were being hard-coded in utf-8. Until one day he started to give that error reported above.

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

That was the problem. It was not just registering the file name, but the file itself. This was causing the error.

I deleted the table record and the backup worked perfectly.

Instead of saving the file to the database, I put the database to save only the file name and path. The file has been saved to the server itself.

    
08.08.2018 / 22:00
0

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

SHOW VARIABLES LIKE "character\_set\_database";

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

mysql --default-character-set=utf8 -u root -p dbname -r dump.sql
    
19.09.2017 / 21:07