1

I run

mysqladmin5 -u root -p ping 

I get a password request.

I found the following instructions but they seem to be rather brutal

<<
After installing MySQL 5 on Solaris with pkgadd you will have to perform
the following post-installation tasks:
As root:
# rm -rf /var/lib/mysql/mysql
Then as mysql:
$ cd /opt/mysql/mysql
$ scripts/mysql_install_db
Then as root:
# /etc/init.d/mysql start
Then as mysql:
$ /opt/mysql/mysql/bin/mysqladmin -u root password 'password'
Then as root:
# /opt/mysql/mysql/bin/mysql_secure_installation
>>

The password was not blank as in some versions of MySQL.

Thank you for pointing that out! The version of my MySQL seems to be

mysql5 --version     
mysql5  Ver 14.12 Distrib 5.0.83, for apple-darwin9.7.0 (i386) using readline 6.0

What is the default password of the MySQL?

  • 1
    mysqladmin is at version 8.41, not MySQL. – Joseph Jul 4 '09 at 13:47
6

Remove the -p. That is making it prompt you for a password.

http://linux.die.net/man/1/mysqladmin

| improve this answer | |
2

The default password depends on the distribution, I think. In some Linux distributions you're asked to enter pass during installation, in other it's blank for connection over loopback.

Try starting MySQL with the --skip-grant-tables option, then logon with the MySQL command line and change root's password.

| improve this answer | |
  • Thank you for pointing that out! --- I fixed my mistake. – Léo Léopold Hertz 준영 Jul 4 '09 at 13:49
  • I guess he is using mysqladmin 8.41 on MySQL5. – nik Jul 4 '09 at 13:58
0
mysql -p ping

is very different from

mysql --password=ping

first one means "Connect to database and prompt for password", second one means, "Connect to database with password 'ping'"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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