Bug #16187 at install, told to run /usr/bin/mysqladmin, but doesn't exist
Submitted: 4 Jan 2006 14:25 Modified: 30 Jan 2006 12:50
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.18 OS:Linux (Redhat EL 4)
Assigned to: CPU Architecture:Any

[4 Jan 2006 14:25] [ name withheld ]
Description:
When I installed the RPM from the command prompt, it included these instructions to change the password:

/usr/bin/mysqladmin -u root password 'new-password'

but /usr/bin/mysqladmin was not included with the distribution.

How to repeat:
install RPM from the command prompt

Suggested fix:
Either correct the instructions, or include the program with the dist.
[4 Jan 2006 15:16] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact RPM you used. /usr/bin/mysqladmin used to be in place in, say, version 5.0.15.
[4 Jan 2006 15:25] [ name withheld ]
5.0.18
[4 Jan 2006 16:11] Valeriy Kravchuk
I need either URLs for all the RPMs you downloaded and installed, or, even better, the results of:

rpm -q -a | grep MySQL

/usr/bin/mysqladmin is included into MySQL-client-* RPMs, by the way.
[4 Jan 2006 21:55] [ name withheld ]
MySQL-server-standard-5.0.18-0.rhel4

only one...
[11 Jan 2006 18:33] Valeriy Kravchuk
So, please, download and install the appropriate MySQL-client-* RPM.

You need some (command line) clients, and, if you are using RPMs, they are in separate RPM. 

It is not a bug, but a result of intended keeping things in separate RPMs. Server installation script just does not check for client RPMs, because it does not depend on them formally. You may use third-parly Java-based software to work with your server, for example (including permission adminsitration etc.)
[11 Jan 2006 23:58] [ name withheld ]
If another piece is required to fulfill the command, then that should be mentioned in the text along with the command. This still requires a change to the comments.

I have downloaded the client as you asked and ran the command suggested exactly as shown. I got access denied for user root@localhost using (Password:NO).

I tried with every password I could guess at.

There is nothing in the docs to suggest how to proceed. I think the docs at minimum need fixing.
[18 Jan 2006 18:00] Valeriy Kravchuk
Please, execute:

/usr/bin/mysqladmin -uroot password newpass

and just copy and paste the results you got. This command should set password "newpass" for the root user. Initially, root user has empty password on Linux.

Then check it with:

mysql -uroot -pnewpass test

You should be connected successfully.
[18 Jan 2006 18:04] [ name withheld ]
I attempted the command below and received the error specified. I can no longer re-create because, without feedback, I need to change the password and did so through other means.

You can re-create by doing a new install on Redhat EL4 with just server and client and running the below command.

Thanks.
[30 Jan 2006 12:50] Valeriy Kravchuk
Sorry, but I can't repeat the problem you had written about. Look:

suse:/home/openxs # rpm -i MySQL-server-5.0.18-0.glibc23.i386.rpm
warning: MySQL-server-5.0.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID
 5072e1f5
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h suse password 'new-password'
See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL
suse:/home/openxs # ps -ef | grep -i mysql
root      9172     1  0 09:55 pts/1    00:00:00 /bin/sh /usr/bin/mysqld_safe --d
atadir=/var/lib/mysql --pid-file=/var/lib/mysql/suse.pid
mysql     9193  9172  6 09:55 pts/1    00:00:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/suse.pid --skip-locking
root      9205  9105  0 09:55 pts/1    00:00:00 grep -i mysql
suse:/home/openxs # rpm -i MySQL-client-5.0.18-0.glibc23.i386.rpm
warning: MySQL-client-5.0.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID
 5072e1f5
suse:/home/openxs # /usr/bin/mysqladmin -uroot password root
suse:/home/openxs # mysql -uroot test
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
suse:/home/openxs # mysql -uroot -proot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye
suse:/home/openxs # uname -a
Linux suse 2.6.11.4-20a-default #1 Wed Mar 23 21:52:37 UTC 2005 i686 i686 i386 GNU/Linux

Surely, it is SuSE and not RHEL4 (I have no root access to those boxes), but our RPMs are built form the same sources and packaged in a similar way. So, all 5.0.18-0 RPMs demonstrates the same behaviour. Everything works just as I described.
[10 Mar 2009 17:52] no no
This bug is still present in -

MySQL-server-5.1.32-0.glibc23.i386

The instructions tell you to run mysqladmin, and make no mention of requiring a client RPM.  The documentation needs to be fixed.