Export the SQL script for a database in a MySQL database-that is, the structure and data of the database are imported into an SQL script, which can then be recovered by the SQL script.
Mysqldump-u MySQL (user name: mysql)-pmysql (password: mysql) p2pserver (database name: p2pserver) > P2pserver.sql (script name: p2pserver.sql)
If you need to export all of your database scripts
<pre name= "code" class= "plain" ><pre name= "code" class= "CPP" >mysqldump-u MySQL (user name: mysql)-pmysql (password: MySQL)-A > P2pserver.sql (file name: p2pserver.sql)
This is the SQL statement inside about Wp_users:
DROP TABLE IF EXISTS ' wp_users ';/*!40101 set @saved_cs_client = @ @character_set_client */;/*!40101 Set Character_set _client = UTF8 */; CREATE TABLE ' wp_users ' ( ' ID ' bigint () unsigned not null auto_increment, ' user_login ' varchar ($) NOT NULL DEFA ULT ', ' user_pass ' varchar ($) NOT null default ' ', ' user_nicename ' varchar (') ', ' "NOT null Default ' ', ' user_e Mail ' varchar ' NOT null default ', ' user_url ' varchar (+) NOT null default ' ', ' user_registered ' datetime NO T null default ' 0000-00-00 00:00:00 ', ' user_activation_key ' varchar (NOT null default ' ', ' user_status ' int ( One) not null default ' 0 ', ' display_name ' varchar (+) NOT null default ' ', PRIMARY key (' ID '), key ' User_lo Gin_key ' (' User_login '), key ' user_nicename ' (' user_nicename ')) Engine=myisam auto_increment=3 DEFAULT charset= utf8;/*!40101 SET character_set_client = @saved_cs_client */;
What do the two keywords for primay key and key mean?
Primay key is the primary key to ensure the uniqueness of the data;
Key is an index constraint that constrains the index of a field in a table, with the common foreign key. Key is a keyword that is unique across all records in a table and can be omitted from ordinary tables. If this keyword is set, queries are accelerated when querying the table, but additional burdens are added.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
A CentOS-based MySQL learning supplement