Home > Article > Operation and Maintenance > 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!