• mysqlhotcopy 只能用于MyISAM表不能用户InnoDB表


    [mysql@master ~]$ mysqlhotcopy test /tmp
    DBI connect(';host=localhost;mysql_read_default_group=mysqlhotcopy','',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at 
    
    /usr/local/mysql5.6/bin/mysqlhotcopy line 197
    
    [mysql@master lib]$ ls /var/lib/mysql/mysql.sock
    ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory
    
    [mysql@master lib]$ ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
    
    [mysql@master lib]$ mysqlhotcopy test /tmp
    Flushed 3 tables with read lock (`test`.`students`, `test`.`t1`, `test`.`t2`) in 0 seconds.
    Locked 0 views () in 0 seconds.
    Copying 8 files...
    Copying indices for 0 files...
    Unlocked tables.
    mysqlhotcopy copied 3 tables (8 files) in 0 seconds (0 seconds overall).
    [mysql@master lib]$ 
    
    备份的内容为:
    [mysql@master tmp]$ cd test/
    [mysql@master test]$ ls
    db.opt  students.frm  students.ibd  t1.frm  t1.ibd  t2.MYD  t2.MYI  t2.frm
    [mysql@master test]$ ls -ltr
    total 236
    -rw-r--r-- 1 mysql mysql    65 Jan 14  2014 db.opt
    -rw-rw---- 1 mysql mysql  8662 Mar  7 08:04 students.frm
    -rw-rw---- 1 mysql mysql 98304 Mar  7 12:51 students.ibd
    -rw-rw---- 1 mysql mysql  8556 Mar  7 12:55 t1.frm
    -rw-rw---- 1 mysql mysql 98304 Mar 12 08:09 t1.ibd
    -rw-rw---- 1 mysql mysql  8556 Mar 13 07:58 t2.frm
    -rw-rw---- 1 mysql mysql  1024 Mar 13 07:58 t2.MYI
    -rw-rw---- 1 mysql mysql     0 Mar 13 07:58 t2.MYD
    
    mysqlhotcopy 只能用于MyISAM表不能用户InnoDB表
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  • 相关阅读:
    博客转移到cnblogs
    mmsplayer for ios 支持iphone ,ipad,ipod touch 版本已经完成。
    mmsplayer for ios v1.0
    无ldf文件情况下恢复数据库数据纪实
    我的Blog页面设计
    使用C#生成静态页面
    C++开发工具
    使用JNDI来读取Notes通讯录中的数据
    关于Char与string
    JavaScript站点荟萃
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351762.html
Copyright © 2020-2023  润新知