Error 1046 3d000 No Database Selected Password
Contents |
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 no database selected mysql Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook
#1046 - No Database Selected Phpmyadmin
Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please #1046 - no database selected import read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Cannot set password for MySQL server in LAMP stack
Error 1046 (3d000) No Database Selected Grant
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 2 of 2 Thread: Cannot set password for MySQL server in LAMP stack Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode July 30th, error code 1046 in mysql workbench 2011 #1 dmubu View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date Jul 2011 Beans 22 Cannot set password for MySQL server in LAMP stack I was having trouble getting my MySQL server. I kept receiving "ACCESS DENIED" messages until I did the following: Code: mysqld_safe --skip-grant-tables & I then tried to set a password by entering: Code: update user set password=PASSWORD("mypassword") where User='root'; and receive this error message: Code: ERROR 1046 (3D000): No database selected So, I can now access MySQL server through the terminal, but I never get prompted for a password. How can I fix this? Adv Reply July 30th, 2011 #2 wojox View Profile View Forum Posts I Ubuntu, Therefore, I Am Join Date Apr 2009 Beans 8,630 Re: Cannot set password for MySQL server in LAMP stack Code: mysql> use mysql; mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit Like that. You told it what DB to use? Adv Reply Quick Navigation Server Platforms Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums The Ubuntu Forum Community Ubuntu Official Fla
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
Error 1046 (3d000) At Line 22: No Database Selected
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
No Database Selected Mysql Command Line
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: Sign no database selected mysqli up Error 1046 No database Selected, how to resolve? up vote 136 down vote favorite 22 Error SQL query: -- -- Database: `work` -- -- -------------------------------------------------------- -- -- Table structure for table `administrators` -- CREATE TABLE IF NOT EXISTS `administrators` ( https://ubuntuforums.org/showthread.php?t=1815129 `user_id` varchar( 30 ) NOT NULL , `password` varchar( 30 ) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = latin1; MySQL said: #1046 - No database selected need some help here. sql mysql mysql-error-1046 share|improve this question edited Oct 23 '10 at 18:21 OMG Ponies 198k36356415 asked Oct 23 '10 at 18:19 steph 687253 5 In case anyone is interested, you can also specify the database name via the CLI command without editing the import file. mysql -u root -p databasename < http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve import.sql –Sam Dufel Nov 24 '14 at 15:36 what happened to me was: create a schema, filled in the name of the database, then it says "fail, no database selected". reopen workbench, i see database that i have just failed to created. Then I choose the database that i have just created, and open a .sql file and run, with both create database and use database statements, it complains "fail no database selected" again. reopen workbench, the tables are all built. MAC system, workbench 6.3.3 –Tiina Jun 9 at 9:12 add a comment| 13 Answers 13 active oldest votes up vote 212 down vote You need to tell MySQL which database to use: USE database_name; before you create a table. In case the database does not exist, you need to create it as: CREATE DATABASE database_name; followed by: USE database_name; share|improve this answer edited Feb 24 '13 at 0:02 Piero 2,881946102 answered Oct 23 '10 at 18:21 codaddict 251k50362442 2 In my case, I had used mysqldump to export a database and was running into this upon import. I just had to edit the exported sql file to add these two commands to the top of it. –bh5k Oct 11 '12 at 17:01 Thanks! This is what I needed. I had a script to create my database and tables but the tables weren't getting created because I needed to insert the USE tablename command. –ckpepper02 Apr 21 '14 at 15:23 add a comment
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 http://dba.stackexchange.com/questions/27245/error-1046-mariadb-no-database-selected this site About Us Learn more about Stack Overflow the company Business http://p2p.wrox.com/book-beginning-php-apache-mysql-web-development-isbn-978-0-7645-5744-6/60911-ch1-mysql-returns-error-1046-no-database-selected.html Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only no database 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 1046 Mariadb: No database selected up vote 3 down vote favorite 1 GRANT ALL ON my-database.* TO my-user@10.0.0.1 IDENTIFIED BY 'password'; ERROR 1046 (3D000): No database selected Ok, I have created a database with a no database selected "-" on the name (did the same thing on the user)... then when I try to set the grants on it the database wont work. If I use the base the error is different MariaDB [(none)]> use my-base Database changed MariaDB [my-base]> GRANT ALL ON 'my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'; 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 ''my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'' at line 1 MariaDB [my-base]> mariadb share|improve this question edited Mar 8 at 22:54 RolandoMySQLDBA 107k15138274 asked Oct 19 '12 at 14:27 maniat1k 1702516 1 In regards to the second error if you set your database, if you're not running in ANSI-quote sql_mode, ' doesn't escape a database object. Use the back tick ` –Derek Downey Oct 19 '12 at 15:03 1 Slight correction to myself...ANSI_QUOTES affects the double-quotes for escaping...single-quotation never does :) –Derek Downey Oct 19 '12 at 15:14 add a comment| 1 Answer 1 active oldest votes up vote 8 down vote accepted Try escaping it with backticks? GRANT AL
Unanswered Topics Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 Ch1 MySQL returns Error 1046: No database selected User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 Read more about Beginning PHP, Apache, MySQLWeb Development or buy the book from your favorite retailer Download the code for Beginning PHP, Apache, MySQLWeb Development Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) August 7th, 2007, 01:26 PM aiche_ag Registered User Join Date: Aug 2007 Location: College Station, TX, USA. Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts Ch1 MySQL returns Error 1046: No database selected I'm working on configuring mysql and mostly everything but one issue I'm having with is that many of my commands will return the Error 1046: No database selected. Here is an example of code C:\>mysql -u root -p Enter password: ******** Welcome to the MySQL monitor.. .. .. mysql>show tables; ERROR 1046 (3D000): No database selected mysql>SELECT user, host FROM user; ERROR 1046 (3D000): No database selected mysql>show databases; *---------* Database ---------- information_schema mysql test -------- 3 rows... ------------ As you can see I've got mysql installed and everything, and PHP works with mysql, but I don't know where this error message is coming from. What can I do to fix this? Keep in mind that I don't have an extensive background with setting up networks. Thanks #2 (permalink) October 1st, 2007, 02:47 PM glg216 Registered User J