MySQL将数据存储在硬盘中的什么位置?

您所在的位置:网站首页 操作系统存储在哪个位置 MySQL将数据存储在硬盘中的什么位置?

MySQL将数据存储在硬盘中的什么位置?

2024-07-16 22:34| 来源: 网络整理| 查看: 265

在这里,我提供了一个简单的用户指南,以查找MySQL数据库在Windows和Linux中在哪里将数据存储在我们的硬盘中。

视窗

1)找到my.ini ,该文件存储在MySQL安装文件夹中。

例如,

C:\Program Files\MySQL\MySQL Server 5.1\my.ini

2)用我们喜欢的文本编辑器打开“ my.ini”。

#Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files/MySQL/MySQL Server 5.1/" #Path to the database root datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"

找到“ datadir”,这是MySQL在Windows中存储数据的位置。

的Linux

1)找到与查找/ -name的my.cnf命令my.cnf中

yongmo@myserver:~$ find / -name my.cnf find: /home/lost+found: Permission denied find: /lost+found: Permission denied /etc/mysql/my.cnf

2)查看my.cnf文件cat /etc/mysql/my.cnf

yongmo@myserver:~$ cat /etc/mysql/my.cnf # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-external-locking

3)找到“ datadir”,这是MySQL在Linux系统中存储数据的位置。

标签: MySQL

翻译自: https://mkyong.com/mysql/where-does-mysql-stored-the-data-in-my-harddisk/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3