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 Answers
Follow the steps:
- Download the latest stable relase of MySQL
- Remove the existing default MySQL that came with the Linux distro
- Install the downloaded MySQL package
- Perform post-install security activities on MySQL.
Reference: http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/
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
.