SQL Command

SQL Command

Comandi per SQL

Import SQL to DB

mysql -u username -p database_name < file.sql

Dumping Data in SQL Format with mysqldump

This section describes how to use mysqldump to create SQL-format dump files. For information about reloading such dump files, see Section 7.4.2, “Reloading SQL-Format Backups”.

By default, mysqldump writes information as SQL statements to the standard output. You can save the output in a file:

shell> mysqldump [arguments] > file_name

To dump all databases, invoke mysqldump with the --all-databases option:

shell> mysqldump --all-databases > dump.sql

To dump only specific databases, name them on the command line and use the --databases option:

shell> mysqldump --databases db1 db2 db3 > dump.sql
0
logo half bottom
Copyright © 2007-2024 COMMS.IT S.r.l. con unico socio | Partita IVA IT09643890016