Error 1046 3d000 No Database Selected Change Password
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
No Database Selected Mysql
about Stack Overflow the company Business Learn more about hiring developers or posting #1046 - no database selected phpmyadmin ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
#1046 - No Database Selected Import
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 1046 No database Selected, how to resolve? up vote 136 error 1046 (3d000) no database selected grant down vote favorite 22 Error SQL query: -- -- Database: `work` -- -- -------------------------------------------------------- -- -- Table structure for table `administrators` -- CREATE TABLE IF NOT EXISTS `administrators` ( `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 error code 1046 in mysql workbench 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 < 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 2
Tags Search LQ Wiki Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Server
Error 1046 (3d000) At Line 22: No Database Selected
[SOLVED] Error while changing off mysql password User Name Remember Me? Password no database selected mysql command line Linux - Server This forum is for the discussion of Linux Software used in a server related context. Notices
No Database Selected Mysqli
Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join 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 http://www.linuxquestions.org/questions/linux-server-73/error-while-changing-off-mysql-password-923074/ 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 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 01-10-2012, 10:09 AM #1 jayakumar01 Member Registered: Nov 2011 Posts: 106 Rep: Err
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 http://dba.stackexchange.com/questions/27245/error-1046-mariadb-no-database-selected Discuss the workings and policies of this site About Us Learn more http://www.backtrack-linux.org/forums/showthread.php?t=28381 about Stack Overflow the company Business 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 no database 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 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 no database selected IDENTIFIED BY 'password'; ERROR 1046 (3D000): No database selected Ok, I have created a database with a "-" 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-quo
Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders Advanced Search Forum BackTrack 4 Forums Beginners Forum MYSQL database Problem If this is your first visit, be sure to check out the Forum Rules by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: MYSQL database Problem Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 05-14-2010,07:53 PM #1 CeEe4 View Profile View Forum Posts Just burned his ISO Join Date Mar 2010 Posts 18 MYSQL database Problem Hi Guys I am trying to set up a mysql database in Backtrack 4 and im having some problems.. First i could not get the service to start at all.. so i had to type Code: mysqld_safe and this seemed to start the service and i could log in by typing.. Code: mysql -u root -p then entering the password "toor" but... How would i create a database with a password on. can some one help.. Thanks.. 05-14-2010,09:04 PM #2 Archangel-Amael View Profile View Forum Posts Super Moderator Join Date Jan 2010 Location Somewhere Posts 8,010 Re: MYSQL database Problem You should try Code: root@dorkbox:~# /etc/init.d/mysql start To start the service. Then to apply a password. Code: root@dorkbox:~# mysqladmin -u root password passwordhere Log in by entering: Code: root@dorkbox:~# mysql -u root -p Of course entering the password you applied earlier. See also: mysql database - mysql beginners tutorial introduction - mysql server - mysql client To start learning. 05-14-2010,09:08 PM #3 CeEe4 View Profile View Forum Posts Just burned his ISO Join Date Mar 2010 Posts 18 Re: MYSQL database Problem Thanks for your quick reply and the great info ill try this out and let you know how it goes.. i keep getting this after i try and change the root password... Code: error: Access denied for user root@localhost (using password: NO) Last edited by CeEe4; 05-14-2010 at 10:10 PM. 05-15-2010,07:42 AM #4 sickness View Profile View Forum Posts Administrator Join Date Jan 2010 Location Behind the screen. Posts 2,921 Re: MYSQL database Problem If you want to change the MySQL password try : Code: mysqladmin -u root -p'oldpassword' password newpass 05-15-2010,02:43 PM #5 roybatty View Profile View Forum Posts Junior Member Join Date Jan 2010 Location Tannh