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

  • 相关阅读:
    问题 K: 找点
    问题 B: 喷水装置(二)(在c++上运行有错误,提交AC了)
    问题 A: 喷水装置(一)
    问题 Q: 最大的数
    问题 O: 寻找最大数(三)
    96.n-1位数
    问题 K: A/B Problem
    问题 D: 某种序列
    被限制的加法
    1031苹果分级
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/8710644.html
Copyright © 2011-2022 走看看