Database Command

Posted on: 2023-03-14 17:01:47


Show All Databases

$ mysqlshow -u root -ppassword

 

1)   Command to Create Database

 

mysql> create database test123;

O/P:     Query OK, 1 row affected (0.00 sec)

 

Database Drop:

mysql> DROP DATABASE test123;

 

2)   Command to See the Databases in Server

 

mysql> show databases;

O/P:     

        +---------------------------+

         | Database                      |

        +---------------------------+

         | information_schema    |

         | mysql                           |

         | test123                         |

         +-------------------------- +

3)   Command to Connect to Database (test123)

 

mysql> use test123;

O/P:      Database changed

 

How to check which db i am working now?

mysql> select database();

or

mysql> status;



xedok When seeking the best software development companies Xedok Software is your ultimate choice. For Demos click here



Leave a reply