Mysql Create User Syntax Error 1064
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Error 1372 (hy000): Password Hash Should Be A 41-digit Hexadecimal Number
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error 1064 mysql 42000 create table Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. mysql 1064 Join them; it only takes a minute: Sign up Can't seem to create user in MySQL console (ERROR 1064 (42000)) up vote 1 down vote favorite 1 Now I'm no MySQL pro, but I've been using it for a
Error 1064 (42000)
good 5-6 years and I've never come across this: I log into my server via SSH I log into MySQL via mysql -u root -pSUPER_SECRET_PASSWORD I write: CREATE USER 'magical_username'@'locahost' IDENTIFIED BY 'super_magical_password'; Now this is where it gets weird. I expect the query to work and I can go about granting permissions, but, I get this instead: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
Mysql Change User Password
for the right syntax to use near 'USER 'magical_username'@'localhost' IDENTIFIED BY 'super_magical_password' at line 1 Any ideas? mysql user share|improve this question edited Jul 20 at 15:27 akshay naidu 95 asked Jan 24 '11 at 12:34 Ahmed Nuaman 4,30053567 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted This isn't really an answer but a solution to the problem: It turns out that the magical sysadmin, in all his wisdom, thought it was a good idea to copy over MySQL's raw DB files rather than doing a dump and import. This, coupled with incorrect permissions and MySQL versions, meant that MySQL had a big issue with users and granting, but serving the data was fine (that's why it seemed really weird). Long story short: rebuilt the box and imported the data the correct way :) share|improve this answer answered Jan 26 '11 at 10:50 Ahmed Nuaman 4,30053567 add a comment| up vote 0 down vote does the equivalent GRANT USAGE ON ... version work? share|improve this answer answered Jan 24 '11 at 12:37 Marc B 273k24233352 add a comment| up vote 0 down vote I've had exactly the same problem. For me it was because I was using a much older MySQL installation - version 4.1.20. The CREATE USER syntax was only introduced in version 5.x. For older 4.x databases you need to use something like G
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss create user mysql the workings and policies of this site About Us Learn more
Mysql Show Users
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each http://stackoverflow.com/questions/4782002/cant-seem-to-create-user-in-mysql-console-error-1064-42000 other. Join them; it only takes a minute: Sign up SQL syntax error when adding a user to the database through php [closed] up vote 0 down vote favorite I am trying to add a user through my admin control panel on my php webpage, and i get this error. You have an error in your SQL syntax; http://stackoverflow.com/questions/31395668/sql-syntax-error-when-adding-a-user-to-the-database-through-php check the manual that corresponds to your MySQL server version for the right syntax I cannot seem to spot the problem for the life of me, here is the full page code.