zoukankan      html  css  js  c++  java
  • mysql 表存储位置更改

    mysql> USE test;

    Database changed

    mysql> SHOW VARIABLES LIKE 'innodb_file_per_table';

    +-----------------------+-------+

    |Variable_name | Value |

    +-----------------------+-------+

    |innodb_file_per_table | ON |

    +-----------------------+-------+

    mysql> CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = '/alternative/directory';

    # MySQL creates a .ibd file for the new table in a subdirectory that corresponding# to the database name

    db_user@ubuntu:~/alternative/directory/test$ ls t1.ibd

    # MySQL creates a .isl file containing the path name for the table in a directory# beneath the MySQL data directory

    db_user@ubuntu:~/mysql/data/test$ ls db.opt t1.frm t1.isl

  • 相关阅读:
    D
    A
    D
    G
    H
    E
    F
    B
    D
    oracle中新建用户和赋予权限
  • 原文地址:https://www.cnblogs.com/yangxiaochu/p/9327819.html
Copyright © 2011-2022 走看看