useTUTORIALS;Databasechangedmysql>Now that we have selected TUTORIALS"/> useTUTORIALS;Databasechangedmysql>Now that we have selected TUTORIALS">
#Once we connect to the MySQL server, we need to select the database we want to use. This is because the MySQL server may have multiple databases available.
Selecting a database from the mysql> prompt is very simple. We can use the SQL command "use" to select the database. To illustrate this, we select the database named "Tutorials" in the following example -
[root@host]# mysql -u root -p Enter password:****** mysql> use TUTORIALS; Database changed mysql>
Now that we have selected the TUTORIALS database, the following All operations will be performed on the TUTORIALS database.
The above is the detailed content of How do we select the database from the command prompt after connecting to the MySQL server?. For more information, please follow other related articles on the PHP Chinese website!