![]() ![]() USE database_name įor example, the following statement set the current database to companydb in MySQL. To select a database, we need to use the USE statement. This will give the following output: ERROR 1046 (3D000): No database selected If you issue any statement, MySQL will issue an error. ![]() That means the current database is not set. Now, check the current database using the following statement. If everything goes well then you will see mysql> on the screen. You give the correct root password of the MySQL server and press enter. Let’s check:įirst, log in to the MySQL server Command Line Client tool using root user. Generally, when you logged into the MySQL Command Line tool without specifying the default database name, MySQL sets the current database to NULL. 1) Selecting database using MySQL Command Line tool This is because there might be more than one databases in the MySQL Server. Summary: in this tutorial, you will learn how to select a MySQL database using the USE command from the MySQL Command Line tool and MySQL Workbench.Īfter connecting to the MySQL instance, you need to select a particular database to start working with. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |