distal-attribute
distal-attribute
distal-attribute
distal-attribute

MySQL data drive designation

debh posted 6 years ago in General
I have MySql and the Data installed on the D drive of my server. It is running low on disk space. I would like to start using another set of drives for additional space however, they will be set as another drive letter, E. Is it possible to have MySql look at data on 2 drive letters. My ini file, c:\windows\my.ini notes the following:

[mysqld]
basedir=D:/mysql
#bind-address=192.168.1.1
datadir=D:/mysql/data
set-variable=max_connections=300
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=D:/mysql/bin/mysqld-nt.exe
user=xxx
password=xxx

Would I add more info to the datadir line?

Thanks
Debh
rosenfield posted 6 years ago
Sort of - you can have different databases within the same server reside on different partitions, but you cannot split a single database across partitions AFAIK.

For each database you want to put on E:\, create a .sym file instead of the database directory, as described in:
http://dev.mysql.com/doc/refman/5.0/en/windows-symbolic-links.html

The .sym file should just contain the name of a folder on E:\.

If you're using InnoDB rather than the MyISAM engine, things are slightly more complicated. InnoDB per default uses a shared tablespace outside of the database directories. It's not impossible though, you just have to enable --innodb_file_per_table:
http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces.html
debh posted 6 years ago
Will this work for 3.5 version? I think what you are saying, I have 2 databases, d:\mysql\data\database and d:\mysql\data\database2. I should copy the d:\mysql\data\database2 to E. On D, I will have d:\mysql\data\database and d:\mysql\data\database2.sym file. This sym file will contain the path to e:\mysql\data\database2.
ansgar posted 6 years ago
There is no 3.5 version of MySQL?
debh posted 6 years ago
I apologize. It is version 3.23.51-nt.

Please login to leave a reply, or register at first.