Error 1064 Create User
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 hiring developers or posting mysql error 1064 create user ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the error 1064 mysql 42000 create table Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: error 1064 mysqldump 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 good 5-6 years and I've never come across this: sql error 1064 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 for the right syntax to use near 'USER 'magical_username'@'localhost' IDENTIFIED BY 'super_magical_password'
Error 1064 Sqlstate 42000
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,29053567 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,29053567 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 272k23231350 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 GRANT ALL PRIVILEGES ON horsedb.* TO 'mrhorse'@'localhost' IDENTIFIED BY 'pass123' share|improve this answer answered Feb 1 '12 at 12:56 Adam 16.3k33369 add a comment| Your Answe
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki
Error 1064 Sqlstate 42000 (er_parse_error)
Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation error 1064 you have an error in your sql syntax User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu error 1064 mysql workbench Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] http://stackoverflow.com/questions/4782002/cant-seem-to-create-user-in-mysql-console-error-1064-42000 MySQL error while attempting to create a new user Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 10 of 10 Thread: MySQL error while attempting to create a new user Thread Tools Show Printable Version Subscribe to this https://ubuntuforums.org/showthread.php?t=2238624 Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode August 9th, 2014 #1 Melnik_Hoogland View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date Apr 2014 Beans 25 DistroUbuntu 14.04 Trusty Tahr MySQL error while attempting to create a new user Hi, I have a problem with the tutorial at https://www.digitalocean.com/communi...n-ubuntu-12-10. I am up to the point when I am supposed to enter "mysql -Bse "create user 'phpBB'@'localhost' identified by 'PassWord';"" (don't think this is relevant, but due to something in my password, I had to use "\ " instead of double quotes and didn't put single quotes around my password, and I had to put "-u root -p" before the "-Bse"), but I kept getting this error: Code: ERROR 1064 (42000) at line 1: 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 '(mypassword)' at line 1 (real password replaced with "(mypassword)") After some searching, I found out that this is sometimes caus
reply 6 posts by porky996t » Sun Nov 01, 2015 5:55 pm Hi,I'm just getting familiar with the commands used to manipulate and populate MySQL database https://www.raspberrypi.org/forums/viewtopic.php?t=124870&p=837738 tables.I have set up a Database called 'times' and wish to create a user called 'timequery'. I have tried:-Code: Select allmysql> CREATE USER ‘timequery’@’localhost’ IDENTIFIED BY ‘password';However, I keep getting the following http://askubuntu.com/questions/469847/error-1064-42000-creating-table-mysql :-Code: Select allERROR 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 'IDENTIFIED BY error 1064 'password' at line 1I have Googled several MySQL and Raspi articles and each one show that this is how a new user is created. Am I being a bit dumb and missing something obvious here? BTW, I have a Raspi 2, Model B+ with Debian installed and have the latest version of MySQL installed too.Thanking you in advance of any help that can be given.Cheers,Porky. error 1064 mysql Posts: 4Joined: Sun Nov 01, 2015 11:42 amLocation: Bolton, Lancashire, England by emgi » Sun Nov 01, 2015 6:30 pm Had to check this because I don't use MySQL that often but it appears you are using the wrong quote-symbol.In your post they look like ` which are next to the 1-key on the left-hand top of the keyboard. You should use ' which is (on my US-International keyboard) next to the Enter-key. However, instead of using the still rather bulky MySQL you may want to have a look at SQLite ( https://www.sqlite.org/) which is THE lightweight SQL database. Even on a Pi2 where you may think it's not such a big deal it will give you better performance without sacrificing too much functionality. /emgi Posts: 320Joined: Thu Nov 07, 2013 4:08 pmLocation: NL by porky996t » Sun Nov 01, 2015 7:17 pm @emgiThanks for the quick response. I have tried again using both the ` (to the immediate left of the 1 key) and also ' (to the immediate left of the Enter key) and neither is successful. I still get the same error code about syntax.Cheers,Porky. Posts: 4Joined: Sun
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start 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 hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ERROR 1064 (42000) creating table MySQL up vote 0 down vote favorite I try to build my own website, and at my website I ask people to enter their name and write a little story. When they are done, they hit submit, and it sends the information to my database. I work with MySQL, and I want to create a table where I can store the information in. This is my MySQL code:+ CREATE TABLE names ( name PRIMARY KEY NOT NULL, message NOT NULL, IPv4 NOT NULL, browser NOT NULL, date NOT NULL, time NOT NULL, ); But when I enter this in my command prompt, it says: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 'PRIMARY KEY NOT NULL, message NOT NULL, IPv4 NOT NULL, browser NOT NULL, date NO' at line 1Can you tell me what I did wrong and how to fix this? I don't know if it's helpful, but I've encluded my PHP script too. It can be a little messy with names because I had to translate the variables to English. My PHP code is (I created it before I created the table, and as you see I did manage to set up my database 'names', also I want to call my table 'names'):
$name = $_POST['name']; $message = $_POST['message']; $user = 'user'; $password = 'Login'; $host = 'localhost:3036'; $browser = $_SERVER['HTTP_USER_AGENT']; $ip = $_SERVER["REMOTE_ADDR"]; date_default_timezone_set('UTC+1'); $date = date("Y-m-d"); $time = date("H:i:s"); $connect = mysql_connect($host, $user, $password); if (! $connect) { $