zoukankan      html  css  js  c++  java
  • RDS 5.7物理备份恢复到本地

    RDS备份恢复到自建数据库
    https://www.alibabacloud.com/help/zh/doc-detail/41817.htm

    物理备份下载恢复innobackupex部分操作参考官方文档。

    第四部开始有变化

    backup-my.cnf 配置文件如下

    # This MySQL options file was generated by innobackupex.

    # The MySQL server
    [mysqld]
    lower_case_table_names=1
    innodb_checksum_algorithm=crc32
    #innodb_log_checksum_alg#orithm=strict_crc32
    innodb_data_file_path=ibdata1:200M:autoextend
    innodb_log_files_in_group=2
    innodb_log_file_size=8589934592
    #innodb_fast_checksum=false
    innodb_page_size=16384
    #innodb_log_block_size=512
    innodb_undo_directory=./
    innodb_undo_tablespaces=0
    server_id=2827224867
    #redo_log_version=1
    #server_uuid=ed6cb933-ed9d-11eb-a1ae-043f72cc452c
    #master_key_id=0
    #innodb_encrypt_algorithm=AES_256_CBC
    sql_mode=''
    skip-grant-tables

    修改权限
    chown -R mysql:mysql /data2


    启动数据库:

    mysqld --defaults-file=/data2/backup-my.cnf --user=mysql --datadir=/data2 --port=3357

    mysql> use mysql
    mysql> alter table proc engine=myisam;
    mysql> alter table event engine=myisam;
    mysql> alter table func engine=myisam;
    mysql> flush privileges;
    mysql> alter user 'aliyun_root'@'127.0.0.1' identified by '123456';

    #aliyun_root 才有root权限。
    修改backup-my.cnf 配置文件去掉 skip-grant-tables
    重启数据库

    mysql -ualiyun_root -p -P3357 -h127.0.0.1

    再创建真正高权限用户。

    mysql> create user super identified by '123456';

    mysql> grant all privileges on *.* to super;

  • 相关阅读:
    Redis从入门到精通:初级篇(转)
    Spring配置中的"classpath:"与"classpath*:"的区别研究(转)
    maven常用命令
    JUC-线程池调度-ScheduledThreadPool
    JUC-线程池
    JUC-线程八锁
    JUC-ReadWriteLock
    JUC-Condition和Lock实践-线程按序交替执行
    Linux 查看.so中导出函数
    nginx配置反向代理
  • 原文地址:https://www.cnblogs.com/nanxiang/p/15127325.html
Copyright © 2011-2022 走看看