LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can not find mysql command prompt (https://www.linuxquestions.org/questions/linux-software-2/can-not-find-mysql-command-prompt-674004/)

Thaidog 10-03-2008 12:53 PM

Can not find mysql command prompt
 
I can not find the command line prompt after installing mysql.

I installed this version:
http://dev.mysql.com/downloads/mysql...x86-64bit-rpms

The rpms installed are:
MySQL-client-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-devel-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-server-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-shared-community-5.0.67-0.rhel5.x86_64.rpm

Not sure if I'm missing anything but the command:
mysql -u root -p (or /usr/bin/mysqladmin -u root -p) does not work.

TB0ne 10-03-2008 01:00 PM

Quote:

Originally Posted by Thaidog (Post 3299215)
I can not find the command line prompt after installing mysql.

I installed this version:
http://dev.mysql.com/downloads/mysql...x86-64bit-rpms

The rpms installed are:
MySQL-client-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-devel-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-server-community-5.0.67-0.rhel5.x86_64.rpm
MySQL-shared-community-5.0.67-0.rhel5.x86_64.rpm

Not sure if I'm missing anything but the command:
mysql -u root -p (or /usr/bin/mysqladmin -u root -p) does not work.

Have you just tried typing in "mysql"?

And saying "does not work" is a bit vague...does it give you ANY errors? Do ANYTHING?

Thaidog 10-03-2008 02:55 PM

Quote:

Originally Posted by TB0ne (Post 3299224)
Have you just tried typing in "mysql"?

And saying "does not work" is a bit vague...does it give you ANY errors? Do ANYTHING?

It does nothing:

[tylerm@node1 ~]$ mysql
-bash: mysql: command not found
[tylerm@node1 ~]$

[root@node1 ~]# mysql
-bash: mysql: command not found
[root@node1 ~]# mysqladmin
-bash: mysqladmin: command not found
[root@node1 ~]#

TB0ne 10-03-2008 02:59 PM

Quote:

Originally Posted by Thaidog (Post 3299333)
It does nothing:

[tylerm@node1 ~]$ mysql
-bash: mysql: command not found
[tylerm@node1 ~]$

[root@node1 ~]# mysql
-bash: mysql: command not found
[root@node1 ~]# mysqladmin
-bash: mysqladmin: command not found
[root@node1 ~]#

Chances are it's not in your path. As root, do either a "locate mysql" or "find / -name mysql". Once you find the path to it, add it to your PATH environment variable, or run the fully-specified command, something like "/usr/bin/mysql" (or wherever it turns out to be).

You can also try typing in "rpm -ql MySQL-client-community-5.0.67-0 | more", and look for the mysql command, it should have the installed path in it.

Thaidog 10-03-2008 03:35 PM

Quote:

Originally Posted by TB0ne (Post 3299338)
Chances are it's not in your path. As root, do either a "locate mysql" or "find / -name mysql". Once you find the path to it, add it to your PATH environment variable, or run the fully-specified command, something like "/usr/bin/mysql" (or wherever it turns out to be).

You can also try typing in "rpm -ql MySQL-client-community-5.0.67-0 | more", and look for the mysql command, it should have the installed path in it.

I'm getting funny results from that... for instance I do a locate mysql and it says it's in /usr/bin/mysql but if I try to run /usr/bin/mysql it says no such file or dir.

Also I got this when trying to query for the rpm:

[root@node1 tylerm]# rpm -ivh MySQL-client-community-5.0.67-0.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
package MySQL-client-community-5.0.67-0.rhel5 is already installed
[root@node1 tylerm]# rpm -ql MySQL-client-community-5.0.67-0.rhel5.x86_64.rpm |
more
package MySQL-client-community-5.0.67-0.rhel5.x86_64.rpm is not installed


All times are GMT -5. The time now is 02:04 PM.