mysql> CREATE TABLE topic(
-> id INT(11) NOT NULL AUTO_INCREMENT,
-> title VARCHAR(100) NOT NULL,
-> description TEXT NULL,
-> created DATETIME NOT NULL,
-> author VARCHAR(30) NULL.
-> profile VARCHAR(100) NULL,
-> PRIMARY KEY(id));
ERROR 1064 (42000): 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 '.
./은 해당 디렉토리에서 mysql을 실행시키는 것입니다. 그래서 처음 터미널을 열으실때는 /root에 터미널이 열리므로 no such file or directory 말그대로 해당 실행 파일이 없다고 하는겁니다. 그래서 /usr/local/mysql/bin로 가셔서 해당 mysql 실행파일을 실행시키고 root로 들어가서 패스워드를 입력한다는 소리인거죠. 환경변수를 잡아주면 mysql -uroot -p를 처음 터미널을 열었던 디렉토리에서 실행시킬수 있습니다. 환경변수 잡는법은 검색엔진으로!
ERROR 1064 (42000): 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 'DATAT
IME NOT NULL,
author VARCHAR(30) NULL,
profile VARCHAR(100) NULL,
PRIMARY K' at line 5
mysql> CREATE TABLE topic1(
-> id INT(11) NOT NULL AUTO_INTCREMENT,
-> title VARCHAR(100) NOT NULL,
-> description TEXT NULL,
-> created DATETIME NOT NULL,
-> author VARCHAR(30) NULL,
-> profile VARCHAR(100) NULL,
-> PRIMARY KEY(id));
ERROR 1064 (42000): 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 'AUTO_INTCREMENT,
title VARCHAR(100) NOT NULL,
description TEXT NULL,
creat' at line 2