0

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: enter image description here

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?

Community
  • 1
  • 1
Moon Man
  • 1
  • 1
  • You have weird quote characters. – zerkms Mar 16 '15 at 23:46
  • sorry, that was me experimenting to see if it makes a difference. I get this error what I type it correctly: mysql> GRANT ALL PRIVILEGES ON simple_cms_development.* TO 'simple_cms'@'localhost' IDENTIFIED BY 'mypassword12345'; ERROR 1146 (42S02): Table 'mysql.user' doesn't exist mysql> – Moon Man Mar 16 '15 at 23:58
  • I was under the impression that using grant creates a new user and simultaneously grants them privileges. . ? – Moon Man Mar 17 '15 at 00:01
  • Did you drop the `mysql` database or `mysql.user` table? – zerkms Mar 17 '15 at 00:06
  • I was playing with drop function and did drop the mysql database and then learned that it just comes standard with mysql. I added it back by entering CREATE DATABASE mysql but I'm guessing that doesn't just bring back all the functionality I wiped out. I also dropped test database. . is there a way to just rest mysql to what it was before I started messing with things? – Moon Man Mar 17 '15 at 00:16
  • also here's what's in there now: – Moon Man Mar 17 '15 at 00:16
  • mysql> show databases; +------------------------+ | Database | +------------------------+ | information_schema | | mysql | | performance_schema | | simple_cms_development | | test | +------------------------+ 5 rows in set (0.00 sec) mysql> – Moon Man Mar 17 '15 at 00:17

1 Answers1

1

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.

Trent Lloyd
  • 1,832
  • 1
  • 15
  • 13
  • thats not the issue here. I was simply experimenting. I've tried it every which way, typing it from scratch, copy paste from word doc, etc. The issue is that I dropped the mysql db and test db when I was playing around. . Now I need to figure out how to uninstall mysql and reinstall it. – Moon Man Mar 17 '15 at 01:31