Home > Database > Mysql Tutorial > mysql在线全备份和恢复

mysql在线全备份和恢复

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:08:53
Original
1419 people have browsed it

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 在线全备份: mysqldump -uroot -p --default-character-set=utf8 --opt --master-data=1 --single-transaction --flush-logs databasename dabase_bak.sql 恢复: 1)# mysql -uroot -p databasename

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  在线全备份:

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

  恢复:

  1)# mysql -uroot -p databasename

  2)mysql>source /root/dabase_bak.sql

  大数据库的备份恢复:

  [root@ticket_backup ~]# vim /etc/my.cnf

  [mysqld]

  datadir=/var/lib/mysql

  socket=/var/lib/mysql/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 = 32M

  query_cache_size = 32M

  key_buffer_size = 384M

  table_cache = 128K

  [mysqld_safe]

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

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

  [mysqldump]

  max_allowed_packet = 32M

mysql在线全备份和恢复

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template