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?

3 Answers3

6

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

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

Joseph
  • 3,787
  • 26
  • 33
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.

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
pQd
  • 29,561
  • 5
  • 64
  • 106
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'"