470,594 Members | 1,454 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

MySQL on Redhat Linux

To make a long story short, let me say I had MySQL working on Windows 98
and everything was fine. Well, I took the big leap and removed all
traces of Windows and Microsoft from the computer. (hooray!) Once I had
Linux running OK, I downloaded and installed MySQL using an RPM package.
I guess the server is running (it says it is every time the computer
starts and it stops successfully every time the computer shuts down)
however, I cannot figure out how to get the MySQL prompt.
I've searched the entire hard drive for MySQL, mysql, MySQL*, mysql* and
probably some others, too. The only thing I found was a shell script
called mysql that starts or stops the server if I am logged in to Linux
as root. I cannot figure out how to start the interactive program that
allows me to make select statements, inserts, updates, etc.
I'm wondering about some things:
Did I download and install the wrong thing?
Am I just not looking for the correct thing?
Did I install it incorrectly?
All the newsgroup messages and documentation give instructions on what
to do from the MySQL prompt, but nobody says anything about how to get
it except to type mysql from the directory where it's installed.
Needless to say, I've tried that and BASH has no idea what I mean.
Jul 23 '05 #1
4 1969
Jeff S (ff*******@hotmail.com) wrote:
: To make a long story short, let me say I had MySQL working on Windows 98
: and everything was fine. Well, I took the big leap and removed all
: traces of Windows and Microsoft from the computer. (hooray!) Once I had
: Linux running OK, I downloaded and installed MySQL using an RPM package.
: I guess the server is running (it says it is every time the computer
: starts and it stops successfully every time the computer shuts down)
: however, I cannot figure out how to get the MySQL prompt.
: I've searched the entire hard drive for MySQL, mysql, MySQL*, mysql* and
: probably some others, too. The only thing I found was a shell script
: called mysql that starts or stops the server if I am logged in to Linux
: as root. I cannot figure out how to start the interactive program that
: allows me to make select statements, inserts, updates, etc.
: I'm wondering about some things:
: Did I download and install the wrong thing?
: Am I just not looking for the correct thing?
: Did I install it incorrectly?
: All the newsgroup messages and documentation give instructions on what
: to do from the MySQL prompt, but nobody says anything about how to get
: it except to type mysql from the directory where it's installed.
: Needless to say, I've tried that and BASH has no idea what I mean.

as root, go to the root directory, and try to find the file.

cd /
find . -iname mysql

if you can't find a working copy of the mysql program (the client, not the
script you mention above) then there must be a client rpm that you need to
install.

If you do find a file called "mysql" that is the client program then I
wonder why it is not in the path already. I would try to install a mysql
client rpm (for your version) anyway to see if it puts things in the
correct location, or you could just add the directory to your path.

--

This space not for rent.
Jul 23 '05 #2
Jeff S wrote:
Did I install it incorrectly?


Most Linux distros have MySQL in their packet system. I suggest you
learn to use that and install MySQL from there. That way you won't
propably get the latest version, but you should get stable version and
installing should be easy. Also updates will come automaticly when you
update your system.

I personally prefer Debian or Ubuntu, so I don't know how it is done in
Redhat, but I think they had a tool called up2date for that task.

Btw. Did you install the server-packet only? Or did you install the
client-packet also?
Jul 23 '05 #3
Among the wreckage we found a fragment on which Jeff S had scratched:
starts and it stops successfully every time the computer shuts down)
however, I cannot figure out how to get the MySQL prompt.


If you install mysql from the RPM that comes with redhat you should find
that you have a /usr/bin/mysql

This is what is on my machine:

[unclebob@bardolph unclebob]$ which mysql
/usr/bin/mysql
[unclebob@bardolph unclebob]$ rpm -qf `which mysql`
mysql-3.23.58-4

Jul 23 '05 #4
In case the others were unclear, Jeff:

You must install both the MySQL Server and the MySQL client programs. If
you're using redhat, the disks should have a stable version from which
you can install using the Redhat Package Manager. Then, when both are
installed and the server is started (you can use the "Applications ->
System Setting -> Server Settings -> Services" to start it, and set it
to start automatically on boot up in Fedora Core 3), you can then use
the 'mysql' command. Typically, you would start MySQL by typing:

'mysql -u root -p'

if you are the root user (this is not the same as the system root!). The
'-u' means you are typing the user next ('root' in this case) and the
'-p' means mysql will prompt you for a password.

An excellent book that has helped me set up a MySQL based website is
Paul Dubois' "MySQL". I highly recommend this or another text so you can
set MySQL up correctly, as in its default state it requires no passwords
and is thus insecure.

Rich Leitner


Jeff S wrote:
To make a long story short, let me say I had MySQL working on Windows 98
and everything was fine. Well, I took the big leap and removed all
traces of Windows and Microsoft from the computer. (hooray!) Once I had
Linux running OK, I downloaded and installed MySQL using an RPM package.
I guess the server is running (it says it is every time the computer
starts and it stops successfully every time the computer shuts down)
however, I cannot figure out how to get the MySQL prompt.
I've searched the entire hard drive for MySQL, mysql, MySQL*, mysql* and
probably some others, too. The only thing I found was a shell script
called mysql that starts or stops the server if I am logged in to Linux
as root. I cannot figure out how to start the interactive program that
allows me to make select statements, inserts, updates, etc.
I'm wondering about some things:
Did I download and install the wrong thing?
Am I just not looking for the correct thing?
Did I install it incorrectly?
All the newsgroup messages and documentation give instructions on what
to do from the MySQL prompt, but nobody says anything about how to get
it except to type mysql from the directory where it's installed.
Needless to say, I've tried that and BASH has no idea what I mean.

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Chris Moy | last post: by
4 posts views Thread by KJemison | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.