简体   繁体   中英

MySQL version 5.6.23 not allowing me to create a new user/grant privileges

It looks like the reason that I'm having this issue is because I was playing with the drop function and ran DROP DATABASE mysql and test... I think I need to reset mysql to default. What's the best way to do that? The instructions here didn't work for me.

----my original question---

I'm trying to create a new user and grant them access in my database but I keep getting a syntax error. I can't see any syntax issues with what I am entering. I'm using MySQL version 5.6.23.

Here is a screenshot of the issue: 在此处输入图片说明

Here is the command I entered into MySQL:

GRANT ALL PRIVILEGES ON simple_cms_development.* TO ‘simple_cms’@’localhost’ IDENTIFIED BY ‘mypassword12345’;

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

Any advice?

You are using the wrong type of quote character, these are accented quotes often found in word documents. Most likely copy and pasted from a website or similar.

I would suggest re-typing the querying but using the quote(') key on your keyboard.

The type of quote you want is a single up and down line, rather than bending towards the quote on both ends. The same kind you see enclosing your password in the error message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM