SQLコマンドのどこが悪い


0

まず、私はこのtutorialをフォローしています。

彼らが言及したように、私は私のクエリを次のように書いています:

mysql> grant select
    -> on play.*
    -> to 'guest' @ 'localhost'
    -> IDENTIFIED BY '459459';
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 ''localhost'
IDENTIFIED BY '459459'' at line 3
mysql> 

しかし、まだエラーが発生します。私が間違っているのは何ですか?

3

The answer, looking at the link you gave appears to be either the capitalisation of the key words, TO or the fact that you have placed a space either side of the @ in line 3.

Present:

-> to 'guest' @ 'localhost'

Correct syntax

-> TO 'guest'@'localhost'