1

I am trying to install mysql in red hat linux. I have tried the command "rpm -qa" it shows a program name mysql-4.1.20-2.RHEL4.1 I am not sure whether mysql is already installed or not. If i try "which mysql" command it says no binary files. I just want to know what mysql-4.1.20-2.RHEL4.1 means in the list of programs. And how to install mysql from command line.

2
  • use rpm -qa | grep mysql*. what does it shows?
    – Ankit
    May 12, 2011 at 7:13
  • @Ankit:mysql-4.1.20-2.RHEL4.1 May 12, 2011 at 8:21

2 Answers 2

1

Follow the steps:

  1. Download the latest stable relase of MySQL
  2. Remove the existing default MySQL that came with the Linux distro
  3. Install the downloaded MySQL package
  4. Perform post-install security activities on MySQL.

Reference: http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/

1

mysql-4.1.20-2.RHEL4.1 in the output of rpm -qa means, that you have this package installed. You can read the description of the package by running rpm -qi mysql

yum search mysql on my RHEL6 gives following short descriptions:

mysql.x86_64 : MySQL client programs and shared libraries
mysql-bench.x86_64 : MySQL benchmark scripts and data
mysql-connector-java.x86_64 : Official JDBC driver for MySQL
mysql-connector-odbc.x86_64 : ODBC driver for MySQL
mysql-devel.i686 : Files for development of MySQL applications
mysql-devel.x86_64 : Files for development of MySQL applications
mysql-embedded.i686 : MySQL as an embeddable library
mysql-embedded.x86_64 : MySQL as an embeddable library
mysql-embedded-devel.i686 : Development files for MySQL as an embeddable library
mysql-embedded-devel.x86_64 : Development files for MySQL as an embeddable
                            : library
mysql-libs.i686 : The shared libraries required for MySQL clients
mysql-libs.x86_64 : The shared libraries required for MySQL clients
mysql-server.x86_64 : The MySQL server and related files
mysql-test.x86_64 : The test suite distributed with MySQL

Therefore, it looks that you have just client installed. You can get a list of files in the package with rpm -ql mysql. If you run rpm -ql mysql | grep bin you will get list of files in bin/sbin directories, which will be binaries. Chances are your client is not named mysql.

To install the server from command line run yum install mysql-server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .