Got it

MySQL Error #1046 (3D000) - No database selected

Created: Mar 25, 2022 09:54:29Latest reply: Mar 28, 2022 20:28:13 667 7 2 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi Hi


I can’t open my tables using “SHOW TABLES;” command and getting the following error message.

MySQL Error #1046 (3D000) - No database selected


Help please

  • x
  • convention:

Featured Answers
zaheernew
MVE Author Created Mar 25, 2022 10:01:56

Hi Hi

The reason for the above issue is you did not choose or select the database. The database selecting steps are given below.

1- Log on to the terminal (MySQL)
2- Type the password (Login)
3- Type the following command. (empdb- type your database name)
a. mysql> USE empdb;
Database changed

b. mysql> SHOW TABLES;

I hope my answer will help you.

View more
  • x
  • convention:

Rumana
Rumana Created Mar 25, 2022 16:42:16 (0) (0)
Thanks @zaheernew very clean answer and yes, I got the point.  
zaheernew
zaheernew Reply Rumana  Created Mar 26, 2022 11:11:29 (0) (0)
Thank you so much dear and if you have any issues with MySQL plz free to contact me, I will support you  
Rumana
Rumana Reply zaheernew  Created Mar 26, 2022 18:37:46 (0) (0)
yeah sure  
olive.zhao
Admin Created Mar 25, 2022 09:57:54

Hello, friend!

Do you choose the database. 

You should run use database name commend to choose a database.

If you did not have a database, you need to create a database first.

How to create a database.

Hope this helps!


View more
  • x
  • convention:

Rumana
Rumana Created Mar 25, 2022 16:40:45 (0) (0)
Thanks admin  
All Answers
olive.zhao
olive.zhao Admin Created Mar 25, 2022 09:57:54

Hello, friend!

Do you choose the database. 

You should run use database name commend to choose a database.

If you did not have a database, you need to create a database first.

How to create a database.

Hope this helps!


View more
  • x
  • convention:

Rumana
Rumana Created Mar 25, 2022 16:40:45 (0) (0)
Thanks admin  
zaheernew
zaheernew MVE Author Created Mar 25, 2022 10:01:56

Hi Hi

The reason for the above issue is you did not choose or select the database. The database selecting steps are given below.

1- Log on to the terminal (MySQL)
2- Type the password (Login)
3- Type the following command. (empdb- type your database name)
a. mysql> USE empdb;
Database changed

b. mysql> SHOW TABLES;

I hope my answer will help you.

View more
  • x
  • convention:

Rumana
Rumana Created Mar 25, 2022 16:42:16 (0) (0)
Thanks @zaheernew very clean answer and yes, I got the point.  
zaheernew
zaheernew Reply Rumana  Created Mar 26, 2022 11:11:29 (0) (0)
Thank you so much dear and if you have any issues with MySQL plz free to contact me, I will support you  
Rumana
Rumana Reply zaheernew  Created Mar 26, 2022 18:37:46 (0) (0)
yeah sure  
atadmrl251
atadmrl251 Moderator Created Mar 28, 2022 20:28:13

great answer
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.