Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to both linux and also mysql but somehow by obtaining help from net I have installed mysql v5.5 on redhat. It starts fine, I have confirmed this by running command: "/etc/init.d/mysqld status"

I have installed required packages as well: mysql-client, -server, -test, -devel, -shared, -embedded

But I am not able to change password using command: mysqladmin -u root password 'new-password' It gives error : bash: mysqladmin: command not found. I tried searching mysqladmin by using command "find / -name mysqladmin" but it returned no result

All I can search on net is adding to path '/bin:/usr/local/mysql/bin' but directory structure after installation mysql v5.5 has changed. There is no such directory like /usr/bin/local/mysql now.

please help me with how to run mysql after changing root's password.

share|improve this question

3 Answers 3

up vote 0 down vote accepted

You can use yum whatprovides to help find the package that contains a particular file e.g.

yum whatprovides /use/bin/mysqladmin
mysql-5.0.77-4.el5_6.6.x86_64 : MySQL client programs and shared libraries
Repo        : base
Matched from:
Filename    : /usr/bin/mysqladmin

If you don't know where the file you are looking fore resides then you can use something like

yum whatprovides "*/mysqladmin"

Which may find other occurrences of a file called mysqladmin so it would be up to you to decide which package to install. In this particular case /usr/bin/mysqladmin is provided by package mysql-5.0.77-4.el5_6.6.x86_64 and

yum install mysql 

should install it for you.

share|improve this answer

On a RHEL6.1 box mysqladmin is provided by

mysql-5.1.52-1.el6_0.1.x86_64

You haven't specified what version of CentOS you're running but perhaps a yum install mysql will provide it for you. Alternatively run:

yum whatprovides /usr/bin/mysqladmin

and install that package.

share|improve this answer

You can install through yum

yum install mysql-server mysql

or download from the mysql site and install using rpm command

dev.mysql.com/downloads/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.