zoukankan      html  css  js  c++  java
  • mysql数据库,查看数据存放目录datadir

    需求描述

      在使用数据库,或者刚接手一个数据库时,可以查看该数据库的数据文件存放在什么位置。

    操作过程

    1.通过查看datadir系统变量来查看数据目录

    [mysql@redhat6 mysql-bin]$ mysql -uroot -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 8
    Server version: 5.5.57-log MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> show variables like 'datadir';
    +---------------+--------------+
    | Variable_name | Value        |
    +---------------+--------------+
    | datadir       | /mysql/data/ |
    +---------------+--------------+
    1 row in set (0.09 sec)

    备注:上面的例子中,数据目录就在/mysql/data/目录下。

    文档创建时间:2018年4月3日19:32:49

  • 相关阅读:
    为什么要用do-while(0)?
    网络字节序&大小端存储
    sql语句w3school教程
    C++编码规范
    std::deque双端队列介绍
    gdb基本操作
    gdb调试多线程
    数据库基础
    删除vector所有元素
    stl迭代器失效
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/8710644.html
Copyright © 2011-2022 走看看