Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify a MySQL .cnf file

Status
Not open for further replies.

pashadowops

Technical User
Jan 15, 2003
11
US
Hello,

I have a Windows 2000 box running MySQL with WinMyAdmin, and Coldfusion Apache.

I installed MySQL in the default directories.

C:/mysql
C:/mysql/data

My server has two drives, C: and D:

C: is the admin end of the web server and the D: of course handles the FTP and HTTP ( where all the websites are ).

I modified the my.cnf file to read the following:

basedir=C:/mysql
datadir=D:/mywebsites/mydata/data

Since I also take advantage of the InnoDB table types, I un-commented the corresponding lines in the sample .cnf file, making sure that I manually created the /ibdata and /iblogs files in the root C:.

I then saved this file to C: and rebooted the server.

Once the server came back online, the WinMyAdmin service would not stay started. I attempted to maually start it several times without success. I looked into the my.ini file and changed it back to read datadir=C:/mysql/data and attempted to restart the service. This time the service started and stayed up. What did I do wrong? Why can't I have the data directory on another HDD? When I changed the data directory to a different location on the same hard drive I had no problems. I've looked at many publications and I see no mention of this deficiency. Can anyone help me? I've been staring at this for many hours, I'm sure all I need is a fresh set of eyes to look at it. Anything anyone can offer will be greatly appriciated.
 
Thanks for the quick response,

No, I did not move the data to the new directory as I have not created any databases. And yes I am the root user and I do have permissions to access the new directory.
 
you need to move there at least the mysql directory from the c:/mysql/data directory
this database is needed by the mysql server
 
Thanks all for your replies.

I will move the data to the new directory when I get to the office. I guess I wasn't looking for files when I looked in the data directory, I was just looking for databases, my bad. We'll see how this works out with fresh eye's and a fresh day. Thanks again.
 
Hey gang,

That did it. I copied the files to the new directory, rebooted the machine, and everything works fine.

Thanks to everyone that had input for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top