Here's a simple startup process that I created:

1.) I created an IFS script file in /qopensys/usr/local/mysql5142 called
startmysql.sh.

I installed my version of MySQL to: /qopensys/usr/local/mysql5142

Here's the contents of that file:

cd /QOpenSys/usr/local/mysql5142/mysql-5.1.42-i5os-power-32bit
/QOpenSys/usr/local/mysql5142/mysql-5.1.42-i5os-power-32bit/bin/mysqld_s
afe &

2.) Then I created a CL called STARTMYSQL and put the following inside:

PGM
DCL VAR(&CMD) TYPE(*CHAR) LEN(1024)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERRORS))

/*---------------------------------------------------------------------
/* BUILD THE PASE CALL TO START MYSQL SERVER */
/*---------------------------------------------------------------------
CHGVAR VAR(&CMD) +
VALUE('/QOpenSys/usr/local/mysql5142/startm+
ysql.sh')

/* START THE MYSQL SERVER */
CALL PGM(QP2SHELL) PARM('/QOpensys/usr/bin/-sh' +
'-c' &CMD)

RETURN

/*---------------------------------------------------------------------
/* Handle Errors
/*---------------------------------------------------------------------
ERRORS:

SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Errors +
occurred while starting MySQL Server') +
MSGTYPE(*ESCAPE)

ENDPGM:
ENDPGM

Then I simply submit STARTMYSQL to QSYSNOMAX to start MySQL as a batch
job.

Regards,
Richard Schoen
RJS Software Systems Inc.
"Get the information you need. Now!"
Document Management, Workflow, Report Delivery, Forms and Business
Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT

------------------------------

message: 2
date: Mon, 4 Jan 2010 14:23:02 -0500
from: "Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx>
subject: [WEB400] Autostarting MYSQL

I am trying to autostart MYSQL.
I have the newer version of MYSQL not the one that originally came with
the Zend Install.

When I start MYSQL via QP2term, I follow the following steps
CALL QP2TERM

cd /QOpenSys/usr/local/mysql/mysql

bin/mysqld_safe &

I can hit my Joomla website after running this.

I have searched for example of autostarting MYSQL but so far I can't get
it to work.

Here is my latest CL.
DCL VAR(&CMD) TYPE(*CHAR) LEN(80)
DCL VAR(&PARM1) TYPE(*CHAR) LEN(20)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')

CHGVAR VAR(&CMD) +
VALUE('/QOpenSys/usr/local/mysql/mysql/')
CHGVAR VAR(&PARM1) VALUE('bin/mysqlsafe &')
/*CHGVAR VAR(&PARM1) VALUE('bin/mysqlsafe --user=mysql & *TCAT *NULL'*/

CHGVAR VAR(&CMD) VALUE(&CMD *TCAT &NULL)
CHGVAR VAR(&PARM1) VALUE(&PARM1 *TCAT &NULL)

PASESHELL:
CALL PGM(QP2SHELL) PARM(&CMD &PARM1)


When I run the CL I get "Not authorized to i5/OS PASE program
/QOpenSys/usr/local/mysql/mysql/"

I'm not sure what I need to do to get this working. (both versions of
&PARM1 give the same result.)
Any ideas?

Thanks
Mike





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.