I think my question was a little unclear. Sorry ... It is not the
problem of running a scipt or starting a service when the computer
starts up. But the problem of issuing statements to the MySQL
-database everytime it is started.
These are the statements:
select initprobedata(id,filename) from AFFYMETRIX.PROBEDATAFILES;
select initqnormdata(id,filename) from AFFYMETRIX.QNORM;
Right now I have a "wrapper" script written in perl that starts mysql
(with /etc/init.d/mysql start) connects to the database and issues my
statments. The problem here is that I don't want passwords to the
database my script and therefore have to supply it every time... Can I
somehow avoid this by putting the statements in a initiation file that
are automatically issued to the mysql database at startup?
(I am running a mysql 4.1 on Fedora 2 system)
//Jesper
Bill Karwin <bi**@karwin.com> wrote in message news:<d1*********@enews2.newsguy.com>...
Jesper wrote: I would like to issue three statements to the database (mysql v4.1)
each time the server starts up. Is there any built in way to do this?
Like a init file to put them in?
You don't mention what operating system you're on. On UNIX/Linux, the
way to do this would be to start mysql in an init script (probably in
/etc/init.d or /etc/rc.d/init.d depending on your platform).
I would recommend scripting your other startup tasks in a separate
script, but link it in the rc.d directories as a `SnnMyScript' script,
where nn is a number greater than the number of your mysql startup
script link. For example, if mysql is S71mysqld, make your own script
at least S72MyScript.
Refer to docs on init if you don't understand what I'm talking about.
Regards,
Bill K.