Need help understanding my.ini files
Posted by: Steven Jurick
Date: December 02, 2012 01:10PM

I am trying to understand my.ini files and how to force MySQL to look at specific directories for databases.

I've had MySql on our server for several versions. Most recent was 5.5. I just upgraded to 5.6.

I have my.ini files in the following locations:
C:\Program Files\MySQL\MySQL Server 5.6\my.ini
C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6\my.ini


C:\Program Files\MySQL\MySQL Server 5.6\my.ini points to:
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:\Program Files\MySQL\MySQL Server 5.6\"

# Path to the database root
datadir="D:\SYS\DB\MYSQL\DATABASES"


C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6\my.ini points to:

# Path to installation directory. All paths are usually resolved relative to this.
basedir="C:\Program Files\MySQL\MySQL Server 5.6\"

# Path to the database root
datadir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6\data\"

The database files are currently at C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6\data\, but I want them at D:\SYS\DB\MYSQL\DATABASES

So it appears that the my.ini in the application data directory is the one that "controls" everything, but when I try to change the datadir parameter to my D: drive, the service will not start. In the past I've been able to change the datadir on the my.ini in the application data directory, restart the service and it all worked. Now I can't. Can someone help me understand why I have two my.ini files and why I can't change the datadir in either?



Edited 4 time(s). Last edit at 12/02/2012 01:24PM by Steven Jurick.

Options: ReplyQuote


Subject
Written By
Posted
Need help understanding my.ini files
December 02, 2012 01:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.