RE: [PHP-ES] volcado de esquem, estructura y datos URGENTE
| From: | Hubert Abasto | Date: | Tue, 30 Apr 2002 12:56:20 +0000 |
| Subject: | RE: [PHP-ES] volcado de esquem, estructura y datos URGENTE | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-22052@lists.php.net to get a copy of this message | ||
Saludos
Puedes usar:
mysqldump [base] -u[usuario] -p > [arch_bolcado]
Este programa esta en [path_mysql]/bin
si ejecutas mysqldump sin parámetros obteines esta ayuda:
Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
-A, --all-databases Dump all the databases. This will be same as
--databases with all databases selected.
-a, --all Include all MySQL specific create options.
-#, --debug=... Output debug log. Often this is 'd:t:o,filename`.
--character-sets-dir=...
Directory where character sets are
-?, --help Display this help message and exit.
-B, --databases To dump several databases. Note the difference in
usage; In this case no tables are given. All name
arguments are regarded as databasenames.
'USE db_name;' will be included in the output
-c, --complete-insert Use complete insert statements.
-C, --compress Use compression in server/client protocol.
--default-character-set=...
Set the default character set
-e, --extended-insert Allows utilization of the new, much faster
INSERT syntax.
--add-drop-table Add a 'drop table' before each create.
--add-locks Add locks around insert statements.
--allow-keywords Allow creation of column names that are keywords.
--delayed-insert Insert rows with INSERT DELAYED.
-F, --flush-logs Flush logs file in server before starting dump.
-f, --force Continue even if we get an sql-error.
-h, --host=... Connect to host.
-l, --lock-tables Lock all tables for read.
-n, --no-create-db 'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'
will not be put in the output. The above line will
be added otherwise, if --databases or
--all-databases option was given.
-t, --no-create-info Don't write table creation info.
-d, --no-data No row information.
-O, --set-variable var=option
give a variable a value. --help lists variables
--opt Same as --add-drop-table --add-locks --all
--extended-insert --quick --lock-tables
-p, --password[=...] Password to use when connecting to server.
If password is not given it's solicited on the tty.
-W, --pipe Use named pipes to connect to server
-P, --port=... Port number to use for connection.
-q, --quick Don't buffer query, dump directly to stdout.
-Q, --quote-names Quote table and column names with `
-S, --socket=... Socket file to use for connection.
--tables Overrides option --databases (-B).
-T, --tab=... Creates tab separated textfile for each table to
given path. (creates .sql and .txt files).
NOTE: This only works if mysqldump is run on
the same machine as the mysqld daemon.
-u, --user=# User for login if not current user.
-v, --verbose Print info about the various stages.
-V, --version Output version information and exit.
-w, --where= dump only selected records; QUOTES mandatory!
EXAMPLES: "--where=user='jimf'" "-wuserid>1"
"-wuserid<1"
Use -T (--tab=...) with --fields-...
--fields-terminated-by=...
Fields in the textfile are terminated by ...
--fields-enclosed-by=...
Fields in the importfile are enclosed by ...
--fields-optionally-enclosed-by=...
Fields in the i.file are opt. enclosed by ...
--fields-escaped-by=...
Fields in the i.file are escaped by ...
--lines-terminated-by=...
Lines in the i.file are terminated by ...
Default options are read from the following files in the given order:
> -----Mensaje original-----
> De: Omar Steffen [mailto:omarsteffen@infovia.com.ar]
> Enviado el: lunes, 29 de abril de 2002 21:47
> Para: lista@phpes.com
> Asunto: [PHP-ES] volcado de esquem, estructura y datos URGENTE
>
>
> Hola listeros: Apelo a vuestra ayuda, soy nuevo en esto y
> necesito hacer el
> volcado de esquema de una base de datos MySQL, estructura y
> datos, a efectos
> de tener un backup de la misma y no tengo idea como hacerla,
> he buscado en
> el manual y no lo he encontrado, si alguno tiene un ejemplo se lo
> agradecería.
> Desde ya muchas gracias.
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>