1. 程式人生 > >mysql建立資料庫報錯You have an error in your SQL syntax; check the manual that corresponds to your MySQL se

mysql建立資料庫報錯You have an error in your SQL syntax; check the manual that corresponds to your MySQL se

在使用xshell遠端連線我的伺服器時想建立一個數據庫

結果執行不對,sql語句如下

mysql> create database 'wechatmall';

結果出現mysql報錯,這個提示很明顯是sql語句有問題

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 ''wechatmall'' at line 1

之前用eclipse建資料庫的時候都是

create
database 資料庫名

在命令環境下會報錯。注意 我的第一條執行建表語句的符號為英文狀態下的單引號

解決方法

正確的應該為英文狀態下的 ` 這個符號在tab鍵的上方

細節註定成敗啊,昨晚做了噩夢..