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