Enter the mysql command: mysql -u+(user name) -p+(password) The mysql statement command must be followed by a ";" Query library name: show databases; Modify the library: use library name; Create a library: create database 【if not exists】【database name】; Query Creation Library: show create database 【database name】; Query to create table: show create table [table name]; Query table: desc [table name]; Query the currently used library: select database(); Create the table: create table 【if not exists】table name (attribute) To remove a library: drop database [database name] Delete a table: drop table [table name] For example: create table student (int id (length) (extra attributes), name varchar (length)); The default length of the int type in the database is 11 If varchar does not provide a length, an error will be reported Not null: not null Auto-increment: auto_increment Primary Key: primary key (attribute name) Attributes are separated by "," Character Set: charset 【Type】 Storage Engine: engin This is the end of this article about the commonly used MySQL commands in the Linux environment. For more relevant MySQL commands in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: About the processing of adaptive layout (using float and margin negative margin)
>>: Case analysis of several MySQL update operations
1. Installation environment Here is also a record...
Table of contents Same Origin Policy Ajax request...
Normally, you'll need to read everyone's s...
Related article: Beginners learn some HTML tags (1...
Anyone who has used Windows Remote Desktop to con...
1. Installation Tip: There is currently no offici...
There is a requirement for a list containing mult...
1. Command Introduction The read command is a bui...
1. KVM virtual machine migration method and issue...
Table of contents 1. Schematic diagram of group q...
Preface Node will be used as the middle layer in ...
1. What is the hyperlink icon specification ?<...
Ubuntu Server 16.04 MySQL 8.0 installation and co...
The implementation principle of Vue2.0/3.0 two-wa...
1. Preparation 1.1 Download and install VMware 15...