3

I recently installed MySQL on RHEL5. I installed it to /usr/local/mysql

Complete steps for installation are here

http://dev.mysql.com/doc/refman/5.1/en/binary-installation.html

shell> cp support-files/mysql.server /etc/init.d/mysql.server

Then I could not start it from /usr/local/mysql/support-files/mysql.server start command

Now I can stop and start MySQL using the below command

/etc/init.d/mysql start
/etc/init.d/mysql stop

To create database here are the first step

mysql -u root -h localhost

I get command not found from anywhere I run. What should I try?

Skwal
  • 2,160
  • 2
  • 20
  • 30
Arun UK
  • 31
  • 1
  • 1
  • 2
  • Normally, you would just `yum install mysql mysql-server` on a Red Hat machine, but if you did it manually I _think_ that the `mysql` binary now resides in `/usr/local/mysql/bin` which is not in your `$PATH`. Please check `ls /usr/local/mysql` and see if there's a `bin/` directory. – Michael Berkowski Feb 25 '14 at 20:37
  • 2
    If so, it is then a matter of adding it to your path `PATH=$PATH:/usr/local/mysql/bin` – Michael Berkowski Feb 25 '14 at 20:37
  • This worked for me ^ - super annoying how there is no mention of /usr/local/mysql/bin in the documentation. Instead they reference the location of other files which is doubly misleading – maxwell Feb 27 '17 at 16:05

0 Answers0