Page 1 of 1

Installing MySQL as service

PostPosted: 23. October 2004 01:03
by Dave_L
[XAMPP 1.4.9, Win2000]

I got errors when trying to use mysql/mysql_installservice.bat to install MySQL as a service. But I was able to do it manually as follows:

Copied mysql\my.cnf to c:\my.ini

From command prompt window in mysql/bin directory:
Code: Select all
mysqld-nt --install mysql --defaults-file=c:\my.ini


I also removed the Windows file association for .cnf, since that made it difficult to manipulate my.cnf.

I had installed XAMPP in c:\Program Files\xampp. I saw a note at mysql.com about mysqld having problems with spaces in the directory name, but that note referred to MySQL < 4.0.17, and XAMPP 1.4.9 uses MySQL 4.0.21, so I wouldn't think that problem would apply.

Other than that, I had no problems with installing XAMPP. :)

PostPosted: 23. October 2004 01:37
by Wiedmann
Hi Dave,

thanks for your report. The resolution for this problem ist:

mysql_installservice.bat
replace line 30-31
Code: Select all
copy %cd%\bin\my.cnf /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file=%cd%\bin\my.cnf


with
Code: Select all
copy "%cd%\bin\my.cnf" /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file="%cd%\bin\my.cnf"

PostPosted: 23. October 2004 07:36
by Dave_L
Thank you, that fixed the problem. :)