Page 1 of 1

SQL comand not found

Posted: Thu Jan 21, 2010 11:00 pm
by ilmwak
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

Re: SQL comand not found

Posted: Mon Jan 25, 2010 3:11 pm
by eliza81
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

Re: SQL comand not found

Posted: Fri Feb 05, 2010 3:04 am
by mjhaston
Same issue here. Anyone else seen this?
> mysqladmin -u root status
/QOpenSys/usr/bin/-sh: mysqladmin: not found.

Re: SQL comand not found

Posted: Wed Feb 17, 2010 4:45 pm
by timclark2000
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