Why is mysql an unknown command in SSH?

I just installed the latest versions of Apache, PHP, and MySQL on my dedicated server running Red Hat 7.2. For some reason when I enter mysql or mysql_config it comes up with: bash: mysql: command not found

I am using Webmin to adminster my databases and everything is workign fine, except through the command line. Can somebody tell me what I need to do to get my server to recognize these commands? I checked the usr/bin directory and they aren't there. The only place I found them in was in: /usr/local/mysql/bin

I am trying to install DBI::mysql but I'm getting the following errors:

[root@userid DBD-mysql-2.1017]# mysql_config
bash: mysql_config: command not found

[root@userid DBD-mysql-2.1017]# perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
I will use the following settings for compiling and testing:

cflags (mysql_config) = /usr/local/mysql
libs (mysql_config) = /usr/local/mysql
nocatchstderr (mysql_config) = /usr/local/mysql
ssl (mysql_config) = /usr/local/mysql
testdb (mysql_config) = /usr/local/mysql
testhost (mysql_config) = /usr/local/mysql
testpassword (mysql_config) = /usr/local/mysql
testuser (mysql_config) = /usr/local/mysql

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Unrecognized argument in LIBS ignored: '/usr/local/mysql'
Using DBI 1.28 installed in /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI
Writing Makefile for DBD::mysql
[root@userid DBD-mysql-2.1017]# make
cc -c -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI /usr/local/mysql -DDBD_MYSQL_WITH_SSL -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.1017\" -DXS_VERSION=\"2.1017\" -fpic -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE dbdimp.c
In file included from dbdimp.c:29:
dbdimp.h:31:49: mysql.h: No such file or directory
dbdimp.h:32:49: errmsg.h: No such file or directory
make: *** [dbdimp.o] Error 1

[root@userid DBD-mysql-2.1017]# mysql_config
bash: mysql_config: command not found

[root@userid DBD-mysql-2.1017]# mysql
bash: mysql: command not found


Any advice would be greatly appreciated.

JTM

 

 

 

 

Top