Drop Database 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
Error 1064 Mysql 42000 Create Database
more about Stack Overflow the company Business Learn more about hiring developers or posting error 1064 mysqldump ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Sql Error 1064
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error on drop default database error [duplicate] up vote -1 error 1064 sqlstate 42000 down vote favorite This question already has an answer here: Syntax error due to using a reserved word as a table or column name in MySQL 1 answer I created a database named "default" in MySQL, but I am not able to drop it through MySQL shell: mysql> drop database default; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to error 1064 sqlstate 42000 (er_parse_error) your MySQL server version for the right syntax to use near 'default' at line 1 Also, I am not able to grant to a particular user I created with this database mysql> grant all on default.* to 'myuser'@'localhost'; 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 'default.* to 'myuser'@'localhost'' at line 1 What went wrong? Please give me some hints. mysql share|improve this question edited Apr 21 '13 at 20:49 Filburt 10.2k73265 asked Apr 21 '13 at 20:41 Qiang Li 3,55364298 marked as duplicate by Amal Murali, hakre, ZoogieZork, Nathan Hughes, rene May 5 '14 at 19:34 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted drop database `default`; Should do the trick. Same for grant. Thru it is better to avoid usage of reserved keywords for naming your schemas/tables/columns etc. share|improve this answer answered Apr 21 '13 at 20:44 alexrider 3,93811024 add a comment| up vote 1 down vote default is
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 1064 You Have An Error In Your Sql Syntax
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges error 1064 mysql workbench Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Error 1064 Mysql 42000 Insert
Join them; it only takes a minute: Sign up How to DROP a database with character '?' in its name? up vote 4 down vote favorite 1 Just trying out ubuntu server on my pc and have been http://stackoverflow.com/questions/16135987/error-on-drop-default-database-error testing some commands including mysql. I'm not sure why phpMyAdmin permitted me to create a database like this 'testing?db'. I'm trying to drop this database via SSH but I get this error: mysql> show databases -> ; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | phpmyadmin | | testing?db | | testing_db | | wp | +--------------------+ 6 rows in set (0.00 sec) mysql> DROP DATABASE testing?db; ERROR 1064 (42000): You have an error http://stackoverflow.com/questions/5446965/how-to-drop-a-database-with-character-in-its-name in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?db' at line 1 mysql> I tried creating a database with a '?' in it and it also gives me syntax error. via ssh. so how do I remove this database? mysql database sql-drop share|improve this question edited Mar 25 '14 at 16:55 Kara 3,12973147 asked Mar 27 '11 at 3:11 snazzify.com 5018 add a comment| 1 Answer 1 active oldest votes up vote 16 down vote accepted Try: DROP DATABASE `testing?db`; share|improve this answer answered Mar 27 '11 at 3:13 mvds 32.7k67091 2 yes, you can escape your table/fields name with a ` character –Yanick Rochon Mar 27 '11 at 3:14 1 I was going to post the same thing. Nice. –Dan Andrews Mar 27 '11 at 3:18 thanks it worked! how do you type that character anyway? –snazzify.com Mar 27 '11 at 5:06 1 It's called the backtick, present on any keyboard, but not in a fixed location. Look somewhere to the top or bottom left. –mvds Mar 27 '11 at 13:04 oh thanks! :) i've been using the computer for as long as i can remember but never noticed this backtick character on my keyboard. –snazzify.com Mar 28 '11 at 4:29 add a comment| Your Answer draft saved draft disc
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools Advanced Search Forum Databases MySQL Help error 1064 when trying to drop database Thread: error 1064 when trying to http://forums.devshed.com/mysql-help-4/error-1064-trying-drop-database-101739.html drop database Share This Thread Tweet This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread November 28th, 2003,05:24 AM #1 No Profile Picture mikieo View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Nov 2003 Posts 2 Rep Power 0 error 1064 when trying to drop database ok this is weird, error 1064 I installed mysql 4.0.16-nt yesterday and it worked fine - I created a forum database and installed phpbb it all worked wonderfully (locally IIS on my xp pro system). Today I came in and I get errors when connecting to the forum database, I reinstalled mysql (don't ask why!) - and when I try to drop the db I get error 1064 !! - additionally the admin program told error 1064 mysql me I didnt have driver 3.51 installed - so I downloaded myodbc and it kind of solved it - but I'm still stuck on the 1064 error. cheers Mike Last edited by mikieo; November 28th, 2003 at 05:30 AM. Faq Reply With Quote December 18th, 2003,06:05 PM #2 No Profile Picture ketan9 View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Dec 2003 Posts 2 Rep Power 0 Hi mike, I was getting same error if you try dropping database from "mysql>" prompt. try the following mysqladmin drop DATABASENAME i was able to get rid of that database, so i guess u also would be.!! Good Luck, Ketan Faq Reply With Quote Share This Thread Tweet This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread « Previous Thread | Next Thread » -- vB4 Default Style-- devshed_2014 Contact Us Developer Forums Archive Top Devshed is a Developer Shed Property, Owned by Jim Boykin, CEO of Internet Marketing Ninjas Dev Shed Forums © 2003 - 2016 by Devshed, LLC. All rights reserved Home Forums Articles Badges Privacy Policy Support Sitemap Newsletter Signup Free Web Developer Tools