I've just finished installing mysql and mysqlserver on centOS as part of a larger install script (the full script is here, though I uncommented the mysql part).
The script ran fine, and it even walked me through the paces of setting up the mysql root password etc.
Script output:
Installed:
mysql.x86_64 0:5.1.61-1.el6_2.1
mysql-server.x86_64 0:5.1.61-1.el6_2.1
Now, in the same session is SSH, I'm unable to access mysql or find any reference to it.
$ mysql -u root -p
-bash: mysql: command not found$ which mysql
/usr/bin/which: no mysql in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
It's just weird- where is it??
which
is only aware of what's in your path.Either chances are this installed somewhere like
/opt/mysql/bin
or elsewhere.I'd suggest running
updatedb && locate bin/mysql
to get a more vast coverage of where it could be.Also, you should confirm it's actually running
ps waux |grep mysql
- that should also give you where the binaries are if it installed and launched the daemon.Try
or
Try looking in /var/lib/mysql/. Thats where it is usually stored. If not then your installation failed, and like the above answer check if the installation part is commented out or not.
Your script didn't install. The installation part is commented
# MySQL install untested! # Install mysql packages (optional) #yum install mysql mysql-server
# Enable mysql to start at boot (optional) #chkconfig --levels 235 mysqld on #service mysqld start
find / -name mysql
Or alternatively try rehash(1) to rebuild the path cache, then try to login to MySQL again.
Don't forget to start the server too