MySQL Forums
Forum List  »  Backup

How to get database encoded name in mysql 5.6
Posted by: vaibhav fursule
Date: July 29, 2013 11:59PM

I do run the following command to get the mysql encoded db name if it contains some special character.

This works fine for MySQL 5.5 or lower versions

Server version: 5.5.31-0ubuntu0.12.04.2-log (Ubuntu)

mysql> SELECT BINARY(CAST('db-name' AS CHAR CHARACTER SET FILENAME));
+--------------------------------------------------------+
| BINARY(CAST('db-name' AS CHAR CHARACTER SET FILENAME)) |
+--------------------------------------------------------+
| db@002dname |
+--------------------------------------------------------+
1 row in set (0.00 sec)

In MySQL 5.6, The above command will not give the encrypt db name.


Server version: 5.6.10-log MySQL Community Server (GPL)

mysql> SELECT BINARY(CAST('db-name' AS CHAR CHARACTER SET FILENAME));
+--------------------------------------------------------+
| BINARY(CAST('db-name' AS CHAR CHARACTER SET FILENAME)) |
+--------------------------------------------------------+
| db-name |
+--------------------------------------------------------+
1 row in set (0.00 sec)


Any body has idea how to get the encoded db name in mysql 5.6.

There was bug with XtraBackup/MEB which does not do the backup of the database or tables if it contains the special character. If we pass the encoded db name/table names then backup works fine .

However with mysql 5.6 it do the backup of database/tables without passing the encoded db name/tables but the backup dir creates the database directory as encoded name. I would like to how to get the encoded db name in mysql 5.6

Options: ReplyQuote


Subject
Views
Written By
Posted
How to get database encoded name in mysql 5.6
3512
July 29, 2013 11:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.