我想使用以下语法创建数据库
mysql -u<uname> -p<password> -e "create database <name>"
Run Code Online (Sandbox Code Playgroud)
但是每当我尝试在数据库名称中使用点(。)时,都会出现错误。
[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: …Run Code Online (Sandbox Code Playgroud)