Home  >  Article  >  Operation and Maintenance  >  How to view the database in linux

How to view the database in linux

王林
王林Original
2019-12-25 10:18:2712713browse

How to view the database in linux

First enter the following command:

mysql -uroot -p

Enter the root password to enter mysql.

Specific viewing steps:

Free online video tutorial recommendation: linux video tutorial

1. Display database

show databases;

2. Select the database

use 数据库名;

3. Display the tables in the database

show tables;

4. Display the structure of the data table

describe 表名;

5. Display the records in the table

SELECT * FROM 表名

6. Database building

create databse 库名;

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to view the database in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn