Every day I backup my wiki database with the following command on a Linux 14.04 on mysql 5.5.62
/usr/bin/mysqldump -u root my_wiki > wiki.`date +"%m-%d-%Y_%T"`.sql
When I restore the dump to the same machine, the restore is successful. But when I restore the dump to a new ubuntu 20.04 box, I see the following in this table.
mysql> select user_name from user;
+------------------------------------------+
| user_name |
+------------------------------------------+
| 0x412E706172646F |
| 0x4162656C2E6564756172646F |
| 0x4164616D2E676F746368 |
| 0x416C6578616E6465722E6275646E6576696368 |
where it should look like
mysql> select user_name from user;
--------------
select user_name from user
--------------
+---------------------+
| user_name |
+---------------------+
| A.bardo |
| Abel.smith |
| Adam.Mo |
| Alexander.bud |
So, what am I not getting here?
What you get there are Hexadecimal Literals. You could select a human readable representation of the stored values by prepending a Character Set Introducer like this:
which would yield
For your query above you could respectively use
So far as to your question. ;-)
To further examine this behavior I would recommend to check the character set of your connection to the database with
Then check the character set of the databases on both systems with
They should be the same.