LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-03-2008, 12:53 PM   #1
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Rep: Reputation: 32
Question 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.
 
Old 10-03-2008, 01:00 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by Thaidog View Post
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?
 
Old 10-03-2008, 02:55 PM   #3
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by TB0ne View Post
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 ~]#
 
Old 10-03-2008, 02:59 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by Thaidog View Post
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.
 
Old 10-03-2008, 03:35 PM   #5
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by TB0ne View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-03-2008 11:18 PM
httpd -l and mysql -p at any command line prompt ZC1 Linux - General 1 05-23-2006 09:58 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
MySQL command prompt (/usr/local/mysql missing) sankar555 Linux - Software 3 03-22-2003 12:48 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 12:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration