Sunday, September 9, 2012

DB server using MySQL Dump previous




*-A server task start *
A. A server with Telnet or SSH remote access. (Remote Access How to find this blog.)
B. Find A server's mysql installation path
    cd / usr / local / mysql / bin [Enter]
The ls [Enter] mssqldump file, make sure that this guy dump (core).
LA. Sql [Enter] / usr / local / mysql / bin / mysqldump-u root-p DB name> to create the dump file name.
Matt. Dump Yard A server, enter the SQL password and press [Enter] wait ..
Bar. A server dump complete stitch.
Four. ls [Enter] to create a dump file name. sql looks OK.
Oh. A FTP server's home directory path to the dump file generated copy.
    cp-r generate the dump file name, sql FTP home directory path in the [ENTER]
    Note that usually the case, the FTP home directory / home / FTP Access Account / is.
Party. Move to the home directory of the FTP
    cd / home / [ENTER] A server FTP access account
Car. ls [Enter] to create a dump file properly, make sure the copy.
Car. Know FTP A server connection after generating the dump file by running my computer to download.
*-A server job ends - *

*-B start-server operations *
A. Know FTP server run by B, B connection after downloaded dump file uploaded to the server.
B. Telnet or SSH to connect to remote server B. (Remote Access How to find this blog.)
The Move to the home directory of the FTP
    cd / home / [ENTER] B server FTP access account
LA. ls [Enter] to upload the dump file. sql looks OK.
Matt. Upload the dump file should go to the B server's mysql installation path.
     cp-r added dump file sql / usr / local / mysql / bin [Enter]
Oh. Go to the mysql installation path
     cd / usr / local / mysql / bin [Enter]
Party. ls [Enter] the files have been copied correctly doetneunji
Car. Dump push
     / Usr / local / mysql / bin / mysql-u root-p server to push B DB Name <added the dump file name. Sql [Enter]
Car. Push server B enter the SQL password and press [Enter] wait ..
Other. Complete dump push.
*-B end server tasks *

- * - * Note
1 Dump sunrise
mysqldump-u user-account-p filename will be the name of the database to store the table name>
Example) mysqldump-u root-p mydb_name> mydb_name.sql
This mydb_name dump is opened.

If you want to dump only open table
Example) mysqldump-u root-p mydb_name member mydb_name.member.sql
This is only the tables you want to dump the court.
2 To recover
mysql-u user account-p DB name the dump file name
Example) mysql-u root-p <. Sql dump file name
Example) mysql-u root-p mydb_name <dump file name, the name of the table. Sql

Specific of a particular table in the db dump only the values ​​you want receive
A, b, c the table >> edu Divi.
Here, in a table named no more than 7 times and 10 times
Less than or equal to value only wish dump. How would you go about it?
-W options used here is the sql statement above questions as follows:
mysqldump-u mysql_admin-p edu a-w'no => 7 and no = <10 '> edu_a_cond.sql

When you do this, no dump will be 7 to 10 times.
Conditionals above-w followed by single quotes tie gives.
conditional statements used in the sql deutsipda.
All tests was haebojin.

Divi Schema (Schema) backup only receive
What do you do when the table schema >> Write to the initial
If one of the tables, desc and spoonfeed them doegeot but shoveling
If the table is 100, ... keueok yireolttae to use the mysqldump option.
-D.

To get back up! Edu called Divi all the tables in the schema
mysqldump-u mysql_admin-p-d edu> edu_db.sql

Get back up! Edu "Divi's a table named schema
mysqldump-u mysql_admin-p-d edu a> edu_a_table.sql

[Option Information]
- Opt
[- Quick - add-locks - add-drop-table - extended-insert]
Update wonbok to delete and backup the existing DB TABLE DATA.
-Q, - quick
Without using a buffer and sends it directly to the standard output.
- Add-locks
Dump after dump of the table before locking the table, loosen the table.
- Add-drop-table
Drop table create table in front of the section from the dump results.
-C, - complte-insert
Full dump, including the name of the field in the INSERT statement
- Extended-insert
INSERT statement generates an INSERT statement to insert all the records from one.
-F, - force
Continue even if a dump of the error
-H, - host
A host of data from MySQL dump
-T, - no-create-info
Not dump table creation information (not only the data dump)
-D, - no-data
Table schema dump
- Default-character-set = euckr
 character set specifies the
- Extended-insert = FALSE
 Written as a separate query statement

No comments:

Post a Comment