Mysql online full backup and recovery

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff to get online full backup: mysqldump-uroot-p -- default-character-setutf8 -- opt -- master-data1 -- single-transaction -- flush-logsdatabasenamedabase_bak. SQL recovery: 1) # mysql-uroot-pdatabasename

Welcome to the Linux community forum and interact with 2 million technical staff> go to online full backup: mysqldump-uroot-p -- default-character-set = utf8 -- opt -- master-data = 1 -- single-transaction -- flush-logs databasename dabase_bak. SQL restore: 1) # mysql-uroot-p databasename

Welcome to the Linux community forum and interact with 2 million technicians>

Online full backup:

Mysqldump-uroot-p -- default-character-set = utf8 -- opt -- master-data = 1 -- single-transaction -- flush-logs databasename> dabase_bak. SQL

Recovery:

1) # mysql-uroot-p databasename <dabase_bak. SQL

2) mysql> source/root/dabase_bak. SQL

Backup recovery for large databases:

[Root @ ticket_backup ~] # Vim/etc/my. cnf

[Mysqld]

Datadir =/var/lib/mysql

Socket =/var/lib/mysql. sock

User = mysql

# Default to using old password format for compatibility with mysql 3.x

# Clients (those using the mysqlclient10 compatibility package ).

Old_passwords = 1

# Disabling symbolic-links is recommended to prevent assorted security risks;

# To do so, uncomment this line:

# Symbolic-links = 0

Log-bin = mysql-bin

Max_allowed_packet = 32 M

Query_cache_size = 32 M

Key_buffer_size = 384 M

Table_cache = 128 K

[Mysqld_safe]

Log-error =/var/log/mysqld. log

Pid-file =/var/run/mysqld. pid

[Mysqldump]

Max_allowed_packet = 32 M

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.