problem redefining datadir in config files

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

problem redefining datadir in config files

Postby billharris » 27. February 2009 08:50

I am running xampp on windows XP.
After installation, the my.ini and my.cnf files contained a line:
datadir=C:/server/xampp/xampp/mysql/data
I moved my data files and changed the datadir line in all my .ini and .cnf files to point to a location on my F: drive.
However, MySql continues to use C:/server/xampp/xampp/mysql/data as the datadir location

I scanned every file on my C: drive and verified that 'C:/server/xampp/xampp/mysql/data' is never assigned to the datadir variable.

Starting and stopping the MySQL server does not help.
Rebooting does not help.
Reinstalling xampp does not help.

My question: where is MySql getting the incorrect (original) vlaue for this variable?
Thank you
billharris
 
Posts: 2
Joined: 27. February 2009 08:25

Re: problem redefining datadir in config files

Postby Izzy » 27. February 2009 09:04

You will may find a file that looks like a shortcut called my in your mysql\bin folder and may be the place that MySQL gets it's configuration info from.

Just drag the file into your text editor and edit the new location for the datadir entry in this section:
# The MySQL server
[mysqld]


Save the file and restart MySQL if required.

You may have MySQL running as a service and perhaps uninstalling the service before editing the my file may help.
Last edited by Izzy on 12. March 2009 10:08, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: problem redefining datadir in config files

Postby billharris » 28. February 2009 02:13

Thanks, but as I said, EVERY file on the C: drive was checked and NONE of them assigned datadir with the value it is getting. ALL cnf files (Windows hides the extension) and the mysql.ini file pointed to the F: drive.

I finally found the solution. I put the files ib_logfile0, ib_logfile1, ibdata, lap1.err and lap1.pid back in the original data directory, and and removed them from the data directory on the F: drive. Only the actual database directories and files were moved. Now the datadir assignment in the .cnf file works properly.

I am running xampp 1.4.16, so newer versions may act differently.
billharris
 
Posts: 2
Joined: 27. February 2009 08:25

Re: problem redefining datadir in config files

Postby Izzy » 28. February 2009 08:30

billharris wrote:I am running xampp 1.4.16, so newer versions may act differently.
You should always give the XAMPP version and your OS when seeking support to save wasting people's time.

The information supplied was relevant to the latest XAMPP 1.7.0 version.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 55 guests