Skip to content
Advertisement

ERROR 1046:No database selected

I would like to create a SQL database but this error occurs I do not know why. Can somebody help me?

My SQL statement:

Can somebody help me?

Advertisement

Answer

Firstly you need to tell MySQL which database you would like to use to create a table:

If your database does not exist yet, you have to create one:

then tell MySQL that you want to use it:

and then you can create a table.

Hope it will help you to solve this problem 🙂

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement