dbTalk Databases Forums  

bash: mysqlcheck: command not found

comp.databases.mysql comp.databases.mysql


Discuss bash: mysqlcheck: command not found in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Spin
 
Posts: n/a

Default bash: mysqlcheck: command not found - 02-13-2010 , 06:51 PM






Gurus,

Obviously from my previous post I an new to MySQL. I have it running on a
Linux server. I have navigated to the directory where MySQL and see a bunch
of commands I can run, such as mysqlcheck and mysqlshow among many others.
But each time, while in the working directory of mysql (which happens to be
/opt/mysql/bin), I get an error of the following types:

bash: mysqlcheck: command not found

bash: mysqlshow: command not found

What am I doing wrong?

--
Spin

Reply With Quote
  #2  
Old   
Jürgen Exner
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 02-13-2010 , 07:59 PM






On Sat, 13 Feb 2010 18:51:30 -0500, "Spin" <Spin (AT) invalid (DOT) com> wrote in
comp.databases.mysql:
Quote:
Obviously from my previous post I an new to MySQL. I have it running on a
Linux server. I have navigated to the directory where MySQL and see a bunch
of commands I can run, such as mysqlcheck and mysqlshow among many others.
But each time, while in the working directory of mysql (which happens to be
/opt/mysql/bin), I get an error of the following types:

bash: mysqlcheck: command not found

bash: mysqlshow: command not found

What am I doing wrong?
A wild guess: /opt/mysql/bin is not part of your PATH? And the current
working directory is not part of your PATH, either (it shouldn't!)?
And you are not familiar with Unix and therefore didn't use the
../mysqlcheck notation to start a program in the current working
directory?

jue

Reply With Quote
  #3  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 02-13-2010 , 08:24 PM



On Sat, 13 Feb 2010 18:51:30 -0500, Spin wrote:
Quote:
Gurus,

Obviously from my previous post I an new to MySQL. I have it running on a
Linux server. I have navigated to the directory where MySQL and see a bunch
of commands I can run, such as mysqlcheck and mysqlshow among many others.
But each time, while in the working directory of mysql (which happens to be
/opt/mysql/bin), I get an error of the following types:

bash: mysqlcheck: command not found

bash: mysqlshow: command not found

What am I doing wrong?
.. is not in your $PATH, and /opt/mysql/bin is not in your $PATH.

--
'Cluids' - def: "Fluids having the effect of restoring or imparting
Clue. Eg; beer, coffee, sulphuric acid, etc."
-- Lionel, in the Monastery

Reply With Quote
  #4  
Old   
Jürgen Exner
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 02-13-2010 , 08:34 PM



On Sat, 13 Feb 2010 19:24:27 -0600, "Peter H. Coffin"
<hellsop (AT) ninehells (DOT) com> wrote in comp.databases.mysql:
Quote:
On Sat, 13 Feb 2010 18:51:30 -0500, Spin wrote:
But each time, while in the working directory of mysql (which happens to be
/opt/mysql/bin), I get an error of the following types:

bash: mysqlcheck: command not found

bash: mysqlshow: command not found

What am I doing wrong?

. is not in your $PATH,
Careful. While true this is exactly as it should be, so there is nothing
wrong with it.

Quote:
and /opt/mysql/bin is not in your $PATH.
And this may or may not be wrong.

jue

Reply With Quote
  #5  
Old   
Michael Henatsch
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 03-09-2010 , 08:26 AM



Although it is almost a month old I happened on this thread just now and
notice once again how a guy asking for help is being fed curt 'advice' by
the more knowledgeable that possibly doesn't help at all if the guy is not
experienced enough. As a novice seeking help I have been frustrated by this
many times and it has to some extent discouraged me from seeking help in
fora and news groups. Here it seems obvious that Spin may benefit from a
little more explaining of how Linux executes commands. Why not go a little
beyond ". is not in your path"? Like this:

Spin,
Simply typing the name of a command works only if the directory in which the
executable for the command resides is in your path. If you want to execute a
command which is NOT in your path you have to type the full path of the
command. For example, if you want to execute a command residing in the
"/sbin" directory you have to type "/sbin/<command>". In your case, you
would have to type "/opt/mysql/bin/mysqlcheck". (Of course, you must also
have execution rights for the command.)

A working directory is usually not in a normal user's path. Therefore, even
if you are in the directory in which the executable resides, typing only the
command name will result in a "command not found". Therefore, even if you
already are in "/opt/mysql/bin" you STILL have to type the full path! A
shorter way of doing this is to prepend "./" to the command name:
../mysqlcheck". This is equivalent to "/opt/mysql/bin/mysqlcheck" because the
dot is the short form for "this directory" (or "working directory") and the
slash separates the directory from the command name.

All this seems to be an unnecessary complication but the purpose is to
prevent a user from inadvertently doing harm to his system.

To see your path simply type "echo $PATH" on the command line.

Mike
(Not a guru)



Spin wrote:

Quote:
Gurus,

Obviously from my previous post I an new to MySQL. I have it running on a
Linux server. I have navigated to the directory where MySQL and see a
bunch of commands I can run, such as mysqlcheck and mysqlshow among many
others. But each time, while in the working directory of mysql (which
happens to be /opt/mysql/bin), I get an error of the following types:

bash: mysqlcheck: command not found

bash: mysqlshow: command not found

What am I doing wrong?

Reply With Quote
  #6  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 03-09-2010 , 11:19 AM



On Tue, 09 Mar 2010 14:26:56 +0100, Michael Henatsch wrote:
Quote:
Although it is almost a month old I happened on this thread just now and
notice once again how a guy asking for help is being fed curt 'advice' by
the more knowledgeable that possibly doesn't help at all if the guy is not
experienced enough. As a novice seeking help I have been frustrated by this
many times and it has to some extent discouraged me from seeking help in
fora and news groups. Here it seems obvious that Spin may benefit from a
little more explaining of how Linux executes commands. Why not go a little
beyond ". is not in your path"? Like this:
Knowing how to use one's operating system is part of the "job
requirements" for doing this stuff, just like blasters need know how to
do basic electrical wiring, pilots really need to know how to read maps,
and chefs need to know about sanitation.

--
I love ASR, you have total freedom of speech as long as it's
punctuated correctly. -- Chris Hacking in a.s.r

Reply With Quote
  #7  
Old   
Michael Henatsch
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 03-10-2010 , 09:48 AM



Peter H. Coffin wrote:

Quote:
On Tue, 09 Mar 2010 14:26:56 +0100, Michael Henatsch wrote:
Although it is almost a month old I happened on this thread just now and
notice once again how a guy asking for help is being fed curt 'advice' by
the more knowledgeable that possibly doesn't help at all if the guy is
not experienced enough. As a novice seeking help I have been frustrated
by this many times and it has to some extent discouraged me from seeking
help in fora and news groups. Here it seems obvious that Spin may benefit
from a little more explaining of how Linux executes commands. Why not go
a little beyond ". is not in your path"? Like this:

Knowing how to use one's operating system is part of the "job
requirements" for doing this stuff, just like blasters need know how to
do basic electrical wiring, pilots really need to know how to read maps,
and chefs need to know about sanitation.

I fully agree with you, Peter. But getting to master these "job
requirements" is a process that takes time and effort. And helping someone
who is at an early stage in this process is something all those should do
who are already a bit further down the road.

When I first came to Linux some 15 or more years ago I was told that help
for the novice abounds: todos, man pages, fora, newsgroups and mailing lists
in which knowledgeable users generously shared their knowledge... I quickly
found that all too often there were know-it-alls who would, instead of
explaining, just write something like "man <command>" or "rtfm", or even
accuse a guy of being 'too lazy' to find the answer himself.

Man pages are often useless for beginners (and still are for me after all
these years), howtos are usually out of date, and the only resource that
remains are fora and newsgroups. It would be nice if in these a culture of
generosity would develop!

I am not a computer professional. I adopted Linux out of interest and
everything I know about this OS I have taught myself - with lots of generous
help from knowledgeable newsgroup or forum members. Now that I am able to
here and there give something back to the community I gladly do so,
remembering my own novice days and considering that the other may be just an
aficionado who is just as enthusiastic about Linux as I was and still am.

I don't think that a newsgroup about cooking requires every one of its
readers to be a chef knowing about sanitation, and I don't think this
newsgroup requires of its readers that they meet certain 'job requirements'.
If that were so I wouldn't be allowed to visit it.

Cheers
Mike

Reply With Quote
  #8  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: bash: mysqlcheck: command not found - 03-10-2010 , 10:26 AM



Michael Henatsch wrote:
Quote:
Peter H. Coffin wrote:

On Tue, 09 Mar 2010 14:26:56 +0100, Michael Henatsch wrote:
Although it is almost a month old I happened on this thread just now and
notice once again how a guy asking for help is being fed curt 'advice' by
the more knowledgeable that possibly doesn't help at all if the guy is
not experienced enough. As a novice seeking help I have been frustrated
by this many times and it has to some extent discouraged me from seeking
help in fora and news groups. Here it seems obvious that Spin may benefit
from a little more explaining of how Linux executes commands. Why not go
a little beyond ". is not in your path"? Like this:
Knowing how to use one's operating system is part of the "job
requirements" for doing this stuff, just like blasters need know how to
do basic electrical wiring, pilots really need to know how to read maps,
and chefs need to know about sanitation.


I fully agree with you, Peter. But getting to master these "job
requirements" is a process that takes time and effort. And helping someone
who is at an early stage in this process is something all those should do
who are already a bit further down the road.

When I first came to Linux some 15 or more years ago I was told that help
for the novice abounds: todos, man pages, fora, newsgroups and mailing lists
in which knowledgeable users generously shared their knowledge... I quickly
found that all too often there were know-it-alls who would, instead of
explaining, just write something like "man <command>" or "rtfm", or even
accuse a guy of being 'too lazy' to find the answer himself.

Man pages are often useless for beginners (and still are for me after all
these years), howtos are usually out of date, and the only resource that
remains are fora and newsgroups. It would be nice if in these a culture of
generosity would develop!

I am not a computer professional. I adopted Linux out of interest and
everything I know about this OS I have taught myself - with lots of generous
help from knowledgeable newsgroup or forum members. Now that I am able to
here and there give something back to the community I gladly do so,
remembering my own novice days and considering that the other may be just an
aficionado who is just as enthusiastic about Linux as I was and still am.

I don't think that a newsgroup about cooking requires every one of its
readers to be a chef knowing about sanitation, and I don't think this
newsgroup requires of its readers that they meet certain 'job requirements'.
If that were so I wouldn't be allowed to visit it.

Cheers
Mike

hear hear mike.

man pages tell you the answer, but only if you know the question.

How tos are usally, 'this is how I did it, in 1993: Things may be
different now'

I spent ages struggling with hot plug stuff to find it became completely
unnecessary in the next release..

I wish people would follow a simple rule.

If they have something to say that helps, say it clearly simply and
politely. If not, don't post at all.


However as long as there are people, who, for some strange reason,
regard being (seen to be) right and responding to everything, even if,
or especially if, it's to put someone else down, as an admirable life
target, things wont change.

Having said that, this NG is better than most.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.