Fra her :
Windows
- Find my.ini, som gemmer i MySQL-installationsmappen.
For eksempel C:\Program Files\MySQL\MySQL Server 5.1\my.ini
- Åbn "my.ini" med vores foretrukne teksteditor.
#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/"
Find “datadir”
, det er her MySQL gemte dataene i Windows.
Linux
- Find my.cnf med kommandoen find / -name my.cnf.
[email protected]:~$ find / -name my.cnf
find: /home/lost+found: Permission denied
find: /lost+found: Permission denied
/etc/mysql/my.cnf
- Se
my.cnf
fil som denne:cat /etc/mysql/my.cnf
[email protected]:~$ 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
- Find
“datadir”
, det er her MySQL gemte dataene i Linux-systemet.