Home » Open Source » MySQL » ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number for mysql root user (Centos 5.4 , Mysql 5.6.10)
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number for mysql root user [message #591264] Fri, 26 July 2013 01:15 Go to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi,

I am trying to install mysql 5.6.10 on CentOS release 5.4 (Final). I have downloaded all the rpm from the dev.mysql.com.

I am following the below link for installing the mysql(ignored in case of perl)

http://opensourcedbms.com/dbms/installing-mysql-5-6-on-cent-os-6-3-redhat-el6-fedora/

After the installation when I am trying to SET PASSWORD for root first time I am getting the error ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number. After google found that solution for this error is for not root user. Same solution tested for root user but didn't get any success.

I am not getting the solution of this error on net. kindly help me in this case.


[root@imob1 old]# rpm -ivh MySQL-shared-5.6.10-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        package MySQL-shared-5.6.10-1.linux_glibc2.5.x86_64 is already installed
[root@imob1 old]# rpm -ivh MySQL-server-5.6.10-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
2013-07-26 11:02:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-07-26 11:02:10 12400 [Note] InnoDB: The InnoDB memory heap is disabled
2013-07-26 11:02:10 12400 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-07-26 11:02:10 12400 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-07-26 11:02:10 12400 [Note] InnoDB: CPU does not support crc32 instructions
2013-07-26 11:02:10 12400 [Note] InnoDB: Using Linux native AIO
2013-07-26 11:02:10 12400 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-07-26 11:02:10 12400 [Note] InnoDB: Completed initialization of buffer pool
2013-07-26 11:02:10 12400 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2013-07-26 11:02:10 12400 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2013-07-26 11:02:10 12400 [Note] InnoDB: Database physically writes the file full: wait...
2013-07-26 11:02:11 12400 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2013-07-26 11:02:14 12400 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2013-07-26 11:02:17 12400 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2013-07-26 11:02:17 12400 [Warning] InnoDB: New log files created, LSN=45781
2013-07-26 11:02:17 12400 [Note] InnoDB: Doublewrite buffer not found: creating new
2013-07-26 11:02:17 12400 [Note] InnoDB: Doublewrite buffer created
2013-07-26 11:02:17 12400 [Note] InnoDB: 128 rollback segment(s) are active.
2013-07-26 11:02:17 12400 [Warning] InnoDB: Creating foreign key constraint system tables.
2013-07-26 11:02:17 12400 [Note] InnoDB: Foreign key constraint system tables created
2013-07-26 11:02:17 12400 [Note] InnoDB: Creating tablespace and datafile system tables.
2013-07-26 11:02:17 12400 [Note] InnoDB: Tablespace and datafile system tables created.
2013-07-26 11:02:17 12400 [Note] InnoDB: Waiting for purge to start
2013-07-26 11:02:17 12400 [Note] InnoDB: 1.2.10 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2013-07-26 11:02:20 12400 [Note] Binlog end
2013-07-26 11:02:20 12400 [Note] InnoDB: FTS optimize thread exiting.
2013-07-26 11:02:20 12400 [Note] InnoDB: Starting shutdown...
2013-07-26 11:02:22 12400 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2013-07-26 11:02:22 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-07-26 11:02:22 12424 [Note] InnoDB: The InnoDB memory heap is disabled
2013-07-26 11:02:22 12424 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-07-26 11:02:22 12424 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-07-26 11:02:22 12424 [Note] InnoDB: CPU does not support crc32 instructions
2013-07-26 11:02:22 12424 [Note] InnoDB: Using Linux native AIO
2013-07-26 11:02:22 12424 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-07-26 11:02:22 12424 [Note] InnoDB: Completed initialization of buffer pool
2013-07-26 11:02:22 12424 [Note] InnoDB: Highest supported file format is Barracuda.
2013-07-26 11:02:22 12424 [Note] InnoDB: 128 rollback segment(s) are active.
2013-07-26 11:02:22 12424 [Note] InnoDB: Waiting for purge to start
2013-07-26 11:02:22 12424 [Note] InnoDB: 1.2.10 started; log sequence number 1625977
2013-07-26 11:02:22 12424 [Note] Binlog end
2013-07-26 11:02:22 12424 [Note] InnoDB: FTS optimize thread exiting.
2013-07-26 11:02:22 12424 [Note] InnoDB: Starting shutdown...
2013-07-26 11:02:24 12424 [Note] InnoDB: Shutdown completed; log sequence number 1625987




A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

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 http://shop.mysql.com

WARNING: Found existing config file /usr/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as /usr/my-new.cnf,
please compare it with your file and take the changes you need.

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

[root@imob1 old]# rpm -ivh MySQL-client-5.6.10-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@imob1 old]# service mysql start
Starting MySQL.                                            [  OK  ]
[root@imob1 old]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password123');
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
mysql> bin/mysqlshow
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bin/mysqlshow' at line 1
mysql> exit
Bye
[root@imob1 old]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.10

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password123');
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
mysql> exit
Bye
[root@imob1 old]# service mysql restart
Shutting down MySQL..                                      [  OK  ]
Starting MySQL.                                            [  OK  ]
[root@imob1 old]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password123');
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
mysql>




Thanks in Advance
Re: ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number for mysql root user [message #604266 is a reply to message #591264] Fri, 27 December 2013 01:42 Go to previous message
rc3d
Messages: 213
Registered: September 2013
Location: Baden-Württemberg
Senior Member
here an example with password string "12345". Google shows over 400 results for search string "ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number"

mysql> select password('12345');
+-------------------------+
| password('123456') |
+-------------------------+
| 2ff898e158cd0311        |
+-------------------------+
1 row in set (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('2ff898e158cd0311');
Query OK, 0 rows affected (0.00 sec)
Previous Topic: link MySQL with Oracle Applications R12.
Next Topic: MariaDB ?
Goto Forum:
  


Current Time: Thu Mar 28 06:57:57 CDT 2024