Error 1046 No database Selected how to resolve

0 votes
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


I need some help here to solve this ERROR. 

Feb 23, 2022 in Others by Rahul
• 9,680 points
1,642 views

1 answer to this question.

0 votes

I can help you with this doubt as the same error occurred for me when I tried to import a database created from before. In order to fix this issue, start with Creating a new database, then use it by use command and try it again. This has helped me!! Have shared a screenshot below for better understanding:-

enter image description here

answered Feb 23, 2022 by Aditya
• 7,680 points

Related Questions In Others

0 votes
0 answers

how to resolve

Started by user admin Running as SYSTEM Building on ...READ MORE

Oct 5, 2021 in Others by Ajinkya
• 120 points
670 views
0 votes
1 answer

How to solve "Error: Apache shutdown unexpectedly"?

To answer your question, as this port ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,680 points
16,627 views
0 votes
1 answer
0 votes
0 answers

How is it possible for DynamoDB to support both Key-Value and Document database properties at the same time

As per DynamoDB's documentation, it supports both ...READ MORE

Apr 5, 2022 in Others by Kichu
• 19,040 points
744 views
0 votes
1 answer
0 votes
1 answer

How to change the default value and to alter a column in sql?

Hi, You can try this: ALTER TABLE foobar_data CHANGE ...READ MORE

answered Jun 24, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,519 views
0 votes
1 answer

What is an index in SQL?

An index is used to speed up ...READ MORE

answered Feb 3, 2022 in Database by Vaani
• 7,070 points
674 views
0 votes
1 answer

Ordering by the order of values in a SQL IN() clause

Use MySQL's FIELD() function: SELECT name, description, ... FROM ... WHERE id ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,020 points
5,276 views
0 votes
1 answer

How to fix "Headers already sent" error in PHP

The functions that send and modify the ...READ MORE

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
7,179 views
0 votes
1 answer

How to create an HTML button that acts like a link

To answer your doubt, the plain HTML ...READ MORE

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
4,382 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP