Error 1064 Create Database
Contents |
Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Server [SOLVED] mysql error while creating database User Name Remember Me? Password Linux - Server This error 1064 mysql 42000 create database forum is for the discussion of Linux Software used in a server related
Mysql Error 1064 Create Table
context. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining
Mysql Error 1064 Create User
our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join
Error 1064 Mysqldump
our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please sql error 1064 visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 07-28-2011, 08:37 AM #1 ramecare Member Registered: Feb 2011 Posts: 179 Rep: mysql error while creating database Dear all, While creating a new database iam facing the below problem,i searched in google to solve but i was not able to solve,can any one help me on this. mysql> create database auto-download-gta; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that correspond
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 error 1064 sqlstate 42000 Business Learn more about hiring developers or posting ads with us Database Administrators Questions error 1064 sqlstate 42000 (er_parse_error) Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to error 1064 you have an error in your sql syntax improve their database skills and learn from others in the community. 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 http://www.linuxquestions.org/questions/linux-server-73/mysql-error-while-creating-database-894292/ up and rise to the top Cannot create MySQL database with name '5e370227_db' up vote 0 down vote favorite Why am I getting error when I try to create database with name '5e370227_db'? I am getting the following error: mysql> create database 5e370227_db; 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 '5e370227_db' at line 1 http://dba.stackexchange.com/questions/90619/cannot-create-mysql-database-with-name-5e370227-db When I try to create a database with name '5a370227_db' (e -> a) it is created successfully: mysql> create database 5a370227_db; Query OK, 1 row affected (0.00 sec) Details: MYSQL: mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1 Linux Centos 2.6.32-358.el6.x86_64 logged as root database admin mysql share|improve this question edited Jan 30 '15 at 12:43 asked Jan 30 '15 at 8:58 Felix 33 1 A SQL identifier is not allowed to start with a number. You must quote the name: "5e370227_db" or using MySQL's dreaded backticks: `5e370227_db` –a_horse_with_no_name Jan 30 '15 at 12:55 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted Interesting problem and I think that I've figured it out. For some reason, MySQL interprets 1e_a_number_ as an exponent - i.e. 10 to the power of something. 1a_a_number has no mathematical meaning, therefore it's not parsed as being a number and accepted as valid. If you notice at the beginning of my experiments below - pure numbers aren't allowed as database/schema names. Congratulations - it looks like you've spotted a MySQL bug. Something like this (underscore following number and e) works. MariaDB [(none)]> create schema 1_e34343_db; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> which appears to confirm my conclusion. This does also - i.e. 1ex works,
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 http://stackoverflow.com/questions/4962904/how-can-i-create-a-mysql-database 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 4.7 million programmers, just like you, https://ubuntuforums.org/showthread.php?t=2238624 helping each other. Join them; it only takes a minute: Sign up How can I create a MySQL-database up vote 2 down vote favorite I tried to create a database by the following command: mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER,INDEX,DROP, -> error 1064 CREATE TEMPORARY TABLES,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE, -> EXECUTE,CREATE VIEW,EVENT,TRIGGER -> ON {projekti_db}.* -> TO '{asiakas}'@'localhost'; and got the following error message 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 '{projekti_db}.* TO '{asiakas}'@'localhost'' at line 4 I have MySQL 5.1.37. What am I doing wrong? mysql share|improve this question edited Feb 10 '11 at 21:33 JohnFx 28.5k1479138 error 1064 create asked Feb 10 '11 at 21:28 Jaakko 132 add a comment| 3 Answers 3 active oldest votes up vote -1 down vote accepted # # First create the Database # CREATE DATABASE projekti_db; # # Then Create the User that will access that database # GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER,INDEX,DROP, CREATE TEMPORARY TABLES,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE, EXECUTE,CREATE VIEW,EVENT,TRIGGER ON projekti_db.* TO 'asiakas'@'localhost'; # # Now verify that the user asiaskas can access the projekti_db only from localhost # SHOW GRANTS FOR 'asiakas'@'localhost'; Give it a Try !!! share|improve this answer edited May 7 '14 at 11:36 answered Feb 10 '11 at 21:42 RolandoMySQLDBA 29.7k105495 add a comment| up vote 0 down vote You are trying to assign roles to a user on a certain database. To create a database, use CREATE DATABASE NAME; share|improve this answer answered Feb 10 '11 at 21:30 Femaref 48.2k391132 Ok, but the same mistake occurs after the query create database projekti_db; –Jaakko Feb 10 '11 at 21:34 don't use curly braces. –Femaref Feb 10 '11 at 21:35 add a comment| up vote 0 down vote That syntax doesn't create a database, it grants db privileges to a user. To create a database, you'd use: CREATE DATABASE projekti_db; See here for a quick cheat sheet for MySQL. share|improve this answer answered Feb 10 '11 at 21:33 Slomojo 17.4k116588 add a com
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu 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] 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 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 caused by the ";" delimiter. So I tried using "--delimiter=//", before and after the "-Bse", with and without backslashes before the slashes, and replacing the ";" with the same thing, but it still gave that error. Finally, I tried using just "mysql -u root -p" and then, at the MySQL prompt, entering: Code: DELIMITER // create user phpBB@localhost identified by (mypassword)// ...but it still gave that error. I tried searching the internet, but didn't find any solution. "mysql --version" outputs "mysql Ver