I advise that you should put your my.cnf in mysql installation location. On Mon, Oct 6, 2008 at 11:06 PM, Varuna Seneviratna < [EMAIL PROTECTED]> wrote:
> Armin > I did what you said, now I understand what you say that there is no > sence in what I wanted to do.But I gave these commands as follows But it > did > not work.What I want is to specify a configuration file which is placed in > the WINDOWS directory.The commands I ran > C:\>NET STOP MySQL > C:\>mysqld-nt --remove > C:\>mysqld-nt --install MYSQL "--defaults-file=\"c:\WINDOWS\my.ini\"" > Service successfully installed. > > C:\>net start mysql > System error 2 has occurred. > > The system cannot find the file specified. > > Why is the file not able to be found, I have taken my.ini out of the MySQL > installation directory and placed it in the WINDOWS directory. > > Are there other commands to start a service apart from NET commands,like > using mysqladmin? > > > Varuna > > On Mon, Oct 6, 2008 at 7:07 PM, Armin Schöffmann > <[EMAIL PROTECTED]> wrote: > > > Varuna, > > obviously it doesn't make much sense, to specify the my.ini location > > in my.ini itself. > > The "--defaults-file" option is used as a direct start-up parameter > > for mysql-server both, run as service or console-process. > > It simply tells the server-process where to look for the oneandonly > my.ini. > > Any fullpath given here, overrides the default search-path during > > server-startup. > > I assume your server-process has been already started with a > > "--defaults-file" -option pointing to a my.ini in the > > mysql-application-directory, therefor it failed after deleting the > > file at this location. > > You may change the direct service-startup options by invoking > > mysqld-nt with options --remove and --install: > > With the "install" option you can specify the complete "command-line" > > including additional options which will be used when the server starts > > as a service. > > > > e.g. > > > > net stop mysql > > > > mysqld-nt --remove > > mysqld-nt --install MYSQL "--defaults-file=\"c:\program > > files(x86)\mysql\my.ini\"" > > > > net start mysql > > > > Regards, > > Armin. > > > > > > 2008/10/6 Varuna Seneviratna <[EMAIL PROTECTED]>: > > > I added a line to the [mysqld) group > > > As --defaults-file="C:\WINDOWS\my.ini" and then I restarted the > > > service.Everything was fine.Then I took out the my.ini file in the > MySQL > > > instalation directory the result was an error message AS > > > > > > Could Not start the MySQL Service on Local Computer > > > > > > Error 1067 The preocess terminated unexpectedly > > > > > > According to the manual MySQL server reads option files in the order > > > > > > Default options are read from the following files in the given order: > > > C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program > > > Files\MySQL\MySQL Server 5.0\my.ini C:\Program Files\MySQL\MySQL Server > > > 5.0\my.cnf > > > > > > > > > To see the order I ran the command mysqld-nt --verbose --help > > > If the optin files read order is as above why can,t get the service > > started > > > > > > Varuna > > > > > > > > > > > -- > > Aegaeon technologies GmbH > > phone: +49.941.8107344 > > fax: +49.941.8107356 > > > > Legal disclaimer: > > http://aegaeon.de/disclaimer/email_all_int.txt > > > -- I'm a MySQL DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn