hi Mike,

Okay, I looked up how I start MYSQL on my system. Because there's a bunch of settings I want to be set properly for MYSQL, I decided the best thing was to create a MYSQL subsystem, and put all of the settings into the subsystem description. That way, you can simply start the subsystem to start MySQL... Without that, it'd be tricky to start it with consistent settings.

So I created a library (also named MYSQL) and created the subsystem objects, etc, in it. I wrote a CL program to create the library and it's objects (so I'd be able to recreate it later if necessary) here's the code for that:

http://code.midrange.com/aa6f8aed17.html

What you'd want to do is modify that CL program as appropriate (in particular, look at the path name where I'm keeping MySQL.. it might not be the place you prefer to use) On my box, I named that source member SETUP

Then compile it:

CRTCLPGM SETUP SRCFILE(xxx/QCLSRC)

Then run it:

CALL SETUP PARM(MYSQL)

(the parm is the name of the library where you want to put the subsystem and other objects -- I used the name MYSQL for that library.) It will also create a QCLSRC file in that library. For convenience I put all of my CL code into that source file. (Which doesn't quite make sense since you already need the code to create the library in the first place -- but I threw the CL in there after I ran it so I didn't lose it.)

Then you need a program named STRMYSQL to start MYSQL (it's called by the subsystem created above). Here's the code for that program:

http://code.midrange.com/637d09aca2.html

And I also created another one called ENDMYSQL that ends the server properly. Here's the code for that:

http://code.midrange.com/dd2725206e.html

Then, in QSTRUPPGM, you should be able to do this:

STRSBS SBSD(MYSQL/MYSQL)
MONMSG MSGID(CPF0000)

(though, I haven't tested that part. My startup process is different... on my box, QSTRUPPGM submits another program that does a whole lot of other processing, and eventually runs those commands... but I assume it'll work just as well if run directly from QSTRUPPGM)

Smith, Mike wrote:
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



NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.