/usr/bin/mysql: No such file or directory

I can start MySQL using

/sbin/service mysql start

but if I try other things like entering "mysql" at a prompt, I get
/usr/bin/myql: No such file or directory

when I do a locate mysql
the directory i notice is "/var/lib/mysql"

so how do I go about fixing this problem?
LVL 1
coldchillinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nick UpsonPrincipal Operations EngineerCommented:
please run these and post the results

find / -name isql -print
echo $PATH
0
rindiCommented:
You might have to run those commands as root or possibly as the user "mysql".
0
coldchillinAuthor Commented:
user mysql does not have permission

as root:

the find / -name sql -print
produced nothing

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rdeleon/bin
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

coldchillinAuthor Commented:
i'm also looking for mysql.so but all i can find is mysql.sock - maybe they are the same file? i say this because the mysql.sock file is also in /var/lib/mysql/
0
Nick UpsonPrincipal Operations EngineerCommented:
if you ran what you typed the first command was wrong

find / -name sql -print should be find / -name isql -print (isql not sql)
0
Nick UpsonPrincipal Operations EngineerCommented:
scrub that  do

ls -l /uns/bin/mysql

thats where it is on my system

0
mjutrasCommented:
Did you check your my.cnf to be sure all paths are correct (usually in /etc/my.cnf)
0
coldchillinAuthor Commented:
I typed the command correctly in the terminal, just not here.

I do not even have a mysql folder in /usr/bin

I started the mysql service
/sbin/service mysql start

but i could not find a my,cnf
updatedb
locate my.cnf

0
rindiCommented:
what is your distro and how did you install mysql?
0
coldchillinAuthor Commented:
I'm using CentOS 4.3
I went to mysql.org > 5.0 > rpm and downloaded the
MySQL-server-5.0.37-0.i386.rpm along with other accompanying files (headers. libraries, shared)

then used
rpm -e <packagename> to remove them

I now have downloaded 4.1.tar.gz
tar xvzf xxxxxx.tar.gz
./configure

It says that there isn't any configuration that needs to be done. but i don't know if i have started mysql
0
coldchillinAuthor Commented:
I still don't have a my.cnf file
0
mjutrasCommented:
after a ./configure you need to do those commands in the same directory where you untared the files:

make
make install

and then you will be able to start it!
0
coldchillinAuthor Commented:
well i downloaded the tar in the /tmp folder, so it was extracted in
/tmp/mysql-standard-4.1.22-pc-linux-gnu-i686

make
make: *** No targets specified and no makefile found Stop.
0
mjutrasCommented:
dont forget the :

./configure

and then:

make
make install
0
mjutrasCommented:
In fact here's what it does:

./configure
# It create the configuration for building the sources and check for libraries dependencies
make
# it create installation script with values defined in configure
make install
# it compile and install where it needs to be, create Environment vars, set startup scripts and sometimes start the required / installed daemons
0
coldchillinAuthor Commented:
./configure
excerpts:

"To help you a bit, I am now going to create the needed MySQL databases and start the MySQL Server for  you...
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system...
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin - u root -h localhost.localdomain password 'new-password'..."

then i execute the "make" command and I still get the above error
0
rindiCommented:
Why didn't you use the centos repository to install mysql?

yum install mysql.

This takes care of all dependencies, no compiling needed, and most of the setup is already done...
0
coldchillinAuthor Commented:
I was trying to put 5.0 on with CentOS but ran into a lot of trouble. I think the shared libraries/directories are different, and you have to do xyz to get it to work, and I didn't, so I finally just decided to go to 4.1. I am just going to try that....but...I think I had problems with that before, too.
0
coldchillinAuthor Commented:
Ok, I did the yum install mysql

How do I start MySQL to verify it worked?

I get:

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

i did an updatedb and locate mysql.sock and I came up with nothing
0
mjutrasCommented:
You tried

/sbin/service mysql start

?
0
coldchillinAuthor Commented:
yes, yes i did

here's my error:

mysql: unrecognized service

0
mjutrasCommented:
is there any

/etc/init.d/mysqld

?

if so try

/etc/init.d/mysqld start
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coldchillinAuthor Commented:
both
/etc/init.d/mysqld start
and
/etc/init.d/mysql start

No such file or directory
0
rindiCommented:
What files do you have in /etc/init.d?
0
coldchillinAuthor Commented:
quite a few, what am i looking for? Nothing with mysql, but there is httpd
0
coldchillinAuthor Commented:
acpid                 dovecot     kudzu           pand             smb
anacron               dund        lm_sensors      pcmcia           snmpd
apmd                  firstboot   mdmonitor       portmap          snmptrapd
arptables_jf          functions   mdmpd           psacct           spamassassin
atd                   gpm         messagebus      rawdevices       squid
auditd                haldaemon   microcode_ctl   readahead        sshd
autofs                halt        named           readahead_early  syslog
BlueDragon_Server_JX  hidd        netdump         rhnsd            tux
bluetooth             httpd       netfs           rpcgssd          vncserver
cpuspeed              innd        netplugd        rpcidmapd        winbind
crond                 ipmi        network         rpcsvcgssd       xfs
cups                  iptables    NetworkManager  rwhod            xinetd
cups-config-daemon    irda        nfs             saslauthd        ypbind
dc_client             irqbalance  nfslock         sendmail         yum
dc_server             isdn        nscd            single
diskdump              killall     ntpd            smartd
0
mjutrasCommented:
If you redo

yum install mysql

does it show you that its already installed or is there any error message?
0
coldchillinAuthor Commented:
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
0
mjutrasCommented:
I just reaslized that I was helping the same guy on both tickets...

http://www.experts-exchange.com/OS/Linux/Q_22473131.html

Now that clarify a couple of things!
0
coldchillinAuthor Commented:
Unfortunately it's not getting me anywhere!
0
coldchillinAuthor Commented:
i'm not sure where exactly the problem/fis was, but i used the GUI and CentOs 4.3 Distro CDs to install more MySQL Packages and did

/etc/init.d/mysql start

and IT WORKED!
0
coldchillinAuthor Commented:
One question, throughout the entire process, I  have never successfully ran
./configure
make
or
make install

does it matter, or is that only when using binaries?
0
mjutrasCommented:
it doesnt matter if you used your system package manager or any binaries. This is used to compile and install from sources
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.