MYSQL-给带特殊符号的数据库创建用户名

MYSQL-创建数据库及用户名:

mysql> create database yoon;
Query OK, 1 row affected (0.00 sec)

 

mysql> grant all privileges on yoon.* to 'yoon'@'%' identified by 'yoon';
Query OK, 0 rows affected (0.00 sec)

 

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

创建数据库及用户名为yoon-db:

mysql> create database `yoon-db`;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on `yoon-db`.* to'yoon'@'%' identified by 'yoon';
Query OK, 0 rows affected (0.00 sec)

 

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

" ` "为esc下面的符号

posted @ 2016-01-29 17:09  __Yoon  阅读(1037)  评论(0编辑  收藏  举报