Use the MySQL visualizer navicat to export the MySQL table structure script method.1. Right-click the database in Navicat → data transfer (data Transfer).2. Select the corresponding table in the database Objects on the left, and select the file in
General table data Less words are used graphical interface, looking more convenient.If there is more data in the table, it is very easy to get stuck with a graphical interface, and this is where the command line will be used.Exporting large amounts
Here's the code to export the stored procedure1 # mysqldump-u database user name-p-n-t-d-r database name > file name Where-D represents--no-create-db,-N for--no-data,-T for--no-create-info, and-R for export function and procedure. So the code above
The default export path is MySQL's built-in path, so ~/documents/is added as a path. Export the entire database- - > ~/ Documents/Test.sqlExporting a database tableMysqldump-h hostname-u username-p Password database table_name> exported file name- -
Navicat you choose to dump the structure and data, the resulting SQL file will be larger, because each piece of data will generate an SQL statement, it will cause the use of source restore will be very slow slow very slow,Files that are exported
MySQL export table structure and table data mysqldump usageThe following are the specific uses of the command line:Mysqldump-u User name-p password- d database name table name > script name;Export the entire database structure and dataMysqldump-h
Exporting Data* * Execute commands directly on the system:Export to CVS format:[[email protected] ~]# mysql-u root-p password-E "select * from Mydb.name into outfile '/tmp/12.cvs ' character set UTF8"--cha Racter Set UTF8 Specifies the appropriate
This is the advanced settings for MySQL same server type data transferWhen you select a database, right-click Dump SQL file the default export record format is a strip of the "full insert statement" in the following formatINSERT into' User ' (' ID
I. Exporting a databaseMy MySQL installation directory is D:\Program files\mysql\mysql Server 5.5\bin\, the export file is expected to be placed in D:\sql\Execute command in MySQL installation directory: Mysqldump-hhostname-uusername-ppassword
Export database (SQL script)Mysqldump-u user name-p database name > exported file nameMysqldump-u root-p--databases db_name > Test_db.sql # #得到整个数据库, the most comprehensive; do not--databases, is not enough information comprehensiveMySQL Export
In general, the Linux system will not be used to use MySQL, after all, there is no such as mysqlfront such as the ready-made Operation tool. But the product of the online server is a Linux server, no way, can only bite the Bullet code shell
-- Export-only data does not export table structureMysqldump-t csf_home-uroot-p123456 > Data.sql-- Download only library data, export structure does not export dataMysqldump--opt-uroot-p123456-d CSF_MAEC > Cm.sql-- Download table structure
The following command-line specific usage is as follows: mysqldump-u user name ----- password- d database name Table name Script name ;1, export the database asdbnamethe table structure (where the user name isRoot,Password isdbpasswd,the
MySQL has different types of log files (each store a different type of log), from which you can query what is done in MySQL, for the management of MySQL, these log files are indispensable.1. Error log: Log the database startup, operation and stop
Centos scheduled task execution mysql data backup when homewwwshell writes a shell script to add execution permission when scheduled execution of the SQL file size everywhere is 0 and no error log output if executed separately. xxx. the SQL exported
Required knowledge: mysql encoding: installation directory in mysql, for example, E: ProgramFilesMySQLMySQLServer5.0my. ini can find the mysql library encoding, in most cases, can be set to uft-8: default-character-setutf8 or gbk:
In the past, what I introduced most was to export the data in the database, so that the data and structure in the table can be exported directly. Today, only the data structure needs to be exported without the table, let's take a look at the
From http://blog.csdn.net/bjtang/article/details/6571760
Export Database files from a database:1. Export the database mydb to the E:/MySQL/mydb. SQL file:Open start> RUN> Enter cmd to enter Command Line ModeC:/> mysqldump-H localhost-u root-P mydb>
The specific usage of the command line is as follows: mysqldump-u uses the anonymous name-P password-D Data Warehouse name table name Script Name;
1. Export the table structure of the database named dbname (the database name is root, the password
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.