zoukankan      html  css  js  c++  java
  • 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表
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  • 相关阅读:
    poj 1286
    poj 1815
    poj 3368
    十个利用矩阵乘法解决的经典题目
    poj 1026
    hdu 1394
    poj 3270
    poj 2154
    《重构 改善既有代码的设计》读书笔记2
    Android OpenGL ES: 渐变颜色的三角形
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351762.html
Copyright © 2011-2022 走看看