這是怎麼回事? 在Gentoo系統上成功執行此操作,但現在在Debian-Squeeze(Raspberry PI)上無法運行。mysql - 錯誤1064(42000)
數據庫是建立好吧
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| arduino1 |
| mysql |
| performance_schema |
| test |
| tmp |
+--------------------+
6 rows in set (0.01 sec)
mysql>
命令是:
#mysql -u root -p******* arduino1 < arduino-tables.sql
結果造成:
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 '(8),
currentTime DATETIME,
timeDiff INT(10),
unixTime INT(10),
currentR1 FL' at line 3
Arduino的tables.sql的內容:
#cat arduino-tables.sql:
CREATE TABLE pulseLog (
id INT(10) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
timeStamp TIMESTAMP(8),
currentTime DATETIME,
timeDiff INT(10),
unixTime INT(10),
currentR1 FLOAT,
currentS2 FLOAT,
currentT3 FLOAT,
currentAverageR1 FLOAT,
currentAverageS2 FLOAT,
currentAverageT3 FLOAT,
temp0 FLOAT,
temp1 FLOAT,
temp2 FLOAT,
temp3 FLOAT,
temp4 FLOAT,
temp5 FLOAT,
pulses INT,
event char(255),
) CHARACTER SET UTF8;
就是這樣!謝謝你們倆。愚蠢的錯誤,但奇怪的是我的Gentoo系統購買了它... – jonsag