SQL comand not found

General discussion on Zend Platform for IBM System i

SQL comand not found

Postby ilmwak on Thu Jan 21, 2010 11:00 pm

Just loaded Zend Core and the MySQL Package that comes with it.
CALL QP2TERM

trying to change password but the "not found" message is returned.

any suggestions?

Thank you

/QOpenSys/usr/bin/-sh

> ./bin/mysqladmin -u root password 'example'
/QOpenSys/usr/bin/-sh: ./bin/mysqladmin: not found.
#
> /bin/mysqladmin -u root password 'example'
/QOpenSys/usr/bin/-sh: /bin/mysqladmin: not found.
#
> cd /usr/local/bin
#
> pwd
/usr/local/bin
#
> mysqladmin -u root password 'example'
/QOpenSys/usr/bin/-sh: mysqladmin: not found.
#
> /usr/local/bin/mysqladmin -u root password 'example'
/QOpenSys/usr/bin/-sh: /usr/local/bin/mysqladmin: not found.
#

===>



F3=Exit F6=Print F9=Retrieve F11=Truncate/Wrap
F13=Clear F17=Top F18=Bottom F21=CL command entry
ilmwak
 
Posts: 3
Joined: Thu Jan 21, 2010 10:52 pm

Re: SQL comand not found

Postby eliza81 on Mon Jan 25, 2010 3:11 pm

Hi,
We use JOIN in the SELECT statement often to retrieve data from multiple related tables.
But, some times we can get into a situation where we may need to use UPDATE statement by joining multiple tables.

Consider a situation:

A table named as USER_DATA is there which contains user details. This table has one column(along with other columns) named as IS_ACTIVE which contain '0' for a user, when a user will be in-active.
One other table is there named as BLOG_DETAILS which contains columns as AUTHOR_ID, IS_ACTIVE and other column to keep blog details.
Now if we want to run a script which should make column IS_ACTIVE = 0 in the BLOG_DATA table for in-active users. Here, we need a sql script which will contain UPDATE with JOIN.

BLOG_DETAILS->AUTHOR_ID is foreign key which refers to the primary key USER_DATA->USER_ID

Let see how can we do it...

UPDATE BLOG_DETAILS SET IS_ACTIVE = 0 FROM BLOG_DETAILS BD INNER JOIN USER_DATA UD ON UD.USER_ID = BD.AUTHOR_ID AND UD.IS_ACTIVE = 0

and we are done...
thanks
Eliza
http://bit.ly/8XjcaR
eliza81
 
Posts: 1
Joined: Mon Jan 25, 2010 3:01 pm

Re: SQL comand not found

Postby mjhaston on Fri Feb 05, 2010 3:04 am

Same issue here. Anyone else seen this?

> mysqladmin -u root status
/QOpenSys/usr/bin/-sh: mysqladmin: not found.
mjhaston
 
Posts: 3
Joined: Thu Feb 04, 2010 5:33 pm

Re: SQL comand not found

Postby timclark2000 on Wed Feb 17, 2010 4:45 pm

For MySQL 5.0 (which comes packaged with Zend Core), the appropriate path is /usr/local/mysql/bin/mysqladmin.

Please try
cd /usr/local/mysql
bin/mysqladmin -u root status
timclark2000
 
Posts: 68
Joined: Fri May 01, 2009 8:19 pm


Return to Zend Platform for i5/OS

Who is online

Users browsing this forum: No registered users and 2 guests