I want to create a database using following syntax
mysql -u<uname> -p<password> -e "create database <name>"
but whenever I try to use dot (.) in database name, it giving me error.
[root@aee9a1889c3f wpg.master]# mysql -uroot -proot -e "create database 'a.n'"
Warning: Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a.n'' at line 1
[root@aee9a1889c3f wpg.master]#
[root@aee9a1889c3f wpg.master]#
[root@aee9a1889c3f wpg.master]# mysql -uroot -proot -e "create database `a.n`"
bash: a.n: command not found
Warning: Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I know I can do that using sql editor like SQL pro or using mysql command editor, but I want to do that this way. Please help.
Thanks in advance