Mysql Error 1372
Contents |
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Newbie :: Change password the new hash mysql change password for user New Topic Advanced Search Change password the new hash Posted
Mysql Change Password Root
by: Matthias Fechner () Date: February 10, 2015 02:51AM Hi, I had in my database mysql password command line users with the old hash and mysql 5.6 refuses to login with the old hash. Currently I'm using mysql 5.6.23 on FreeBSD. But it
Mysql Password Hash Should Be A 16-digit Hexadecimal Number
is not working. I logged into the database with root account and executed: mysql> SET PASSWORD FOR 'test'@'localhost' = PASSWORD('test'); ERROR 1372 (HY000): Password hash should be a 16-digit hexadecimal number mysql> select PASSWORD('test'); +-------------------------------------------+ | PASSWORD('test') | +-------------------------------------------+ | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 | +-------------------------------------------+ 1 row in set (0.00 sec) mysql> mysql default password select @@OLD_PASSWORDS; +-----------------+ | @@OLD_PASSWORDS | +-----------------+ | 0 | +-----------------+ 1 row in set (0.00 sec) Has here maybe anyone an idea why it fails? Thanks Matthias Navigate:Previous Message•Next Message Options:Reply•Quote Subject Written By Posted Change password the new hash Matthias Fechner 02/10/2015 02:51AM Re: Change password the new hash Jonathan Stephens 02/10/2015 06:40AM Re: Change password the new hash Jonathan Stephens 02/10/2015 06:51AM Re: Change password the new hash Matthias Fechner 02/10/2015 10:52AM Re: Change password the new hash Jonathan Stephens 02/11/2015 02:45AM Re: Change password the new hash Matthias Fechner 02/11/2015 03:11AM Re: Change password the new hash Matthias Fechner 02/11/2015 05:31AM Re: Change password the new hash James Mason 03/13/2015 10:49AM Re: Change password the new hash Jehad Keriaki 04/09/2015 08:47AM Re: Change password the new hash Jonathan Stephens 02/11/2015 03:30PM Re: Change password the new hash Matthias Fechner 02/12/2015 02:24AM Sorry, you can
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company
Mysql Change User
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Cpanel Dbd::mysql::db Do Failed: Password Hash Should Be A 16-digit Hexadecimal Number
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, mysql delete user just like you, helping each other. Join them; it only takes a minute: Sign up Mysql user creation script up vote 21 down vote favorite 4 I'm trying to automate MySQL user creation procedure. I thought of http://forums.mysql.com/read.php?10,628001 creating a temp file that would contain mysql user creation statements, then I would have call it like this : mysql -u root -proot < temp But I'm stuck with mysql syntax : here's the content of my temp file : DROP DATABASE IF EXISTS mytestdatabase; CREATE DATABASE mytestdatabase; SELECT @password:="my password"; DELETE FROM mysql.user WHERE Host='localhost' AND User='mytestdatabase'; GRANT ALL PRIVILEGES ON mytestdatabase.* TO 'mytestdatabase'@'localhost' IDENTIFIED BY PASSWORD '@password'; FLUSH PRIVILEGES; But the http://stackoverflow.com/questions/9529651/mysql-user-creation-script line GRANT ALL PRIVILEGES ON mytestdatabase.* TO 'mytestdatabase'@'localhost' IDENTIFIED BY PASSWORD '@password'; (Password hash should be a 41-digit hexadecimal number ) is not interpreted as I would expect it to be. Even if I remove single quotes around the @password tag I still have errors (syntax error) How can I make this work ? mysql database share|improve this question edited Mar 2 '12 at 8:05 Korhan Ozturk 7,17542336 asked Mar 2 '12 at 7:38 ling 1,36611418 What's the error message? –Korhan Ozturk Mar 2 '12 at 7:44 ERROR 1372 (HY000) at line 9: Password hash should be a 41-digit hexadecimal number –ling Mar 2 '12 at 7:48 add a comment| 6 Answers 6 active oldest votes up vote 38 down vote accepted Just to answer why the error occurs and to show the differnce: A) Expects @password to be a hash string 1 value: GRANT ALL PRIVILEGES ON `mydb` . * TO 'username'@'localhost' IDENTIFIED BY PASSWORD '@password'; Note the use of the PASSWORD keyword! B) Expects @password to be a clear-text string value: GRANT ALL PRIVILEGES ON `mydb` . * TO 'username'@'localhost' IDENTIFIED BY '@password'; Note the missing PASSWORD keyword! 1 Where "hash string" is the result of SELECT PASSWORD('clearTextPasswd'); - see Snowman's answer for an example. share|improve this answer edited May 23 '14 at 21:29 an
hash should be a 41-digit hexadecimal number You http://davidbomba.com/2013/08/13/mysql-error-1372-hy000-password-hash-should-be-a-41-digit-hexadecimal/ can resolve this by following the steps listed below. mysql> select password('12345');
+-------------------------+
| password('123456') |
+-------------------------+
| https://www.sitepoint.com/community/t/how-to-create-an-account-in-mysql/37920 2ff898e158cd0311 |
+-------------------------+
1 row in set (0.00 sec) mysql> create user test identified by password ’2ff898e158cd0311′; mysql change Query OK, 0 rows affected (0.00 sec) MySQL ← Mysql Remote Access iser target login → Comments are closed. RSS Feed Recent Posts Keepalived - Spamming /var/log/syslog -> Push Multiple Views onto Nav Stack Set a background colour of a uitableview Back Button Text mysql change password Background image in UITableViewCell Recent CommentsArchives September 2016 February 2016 January 2016 August 2015 May 2015 December 2014 November 2014 August 2014 May 2014 April 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 August 2011 July 2011 April 2011 February 2011 December 2010 November 2010 October 2010 August 2010 July 2010 Categories AngularJS Bash iOS Laravel 5 MySQL omnios Remote Transfer Uncategorized Virtualization VPS XFS ZFS Meta Log in Entries RSS Comments RSS WordPress.org Copyright © 2016 David Bomba | Powered by zBench and WordPress ↑ Top
USER [username] IDENTIFIED BY PASSWORD 'password';, but MySQL shows the following: ERROR 1372 (HY000); Password hash should be 41-digit hexadecimal number.Please, help me! force 2013-12-22 20:20:41 UTC #2 If you use IDENTIFIED BY PASSWORD 'password', that signifies that you will be using a hashed hexidecimal value as the password. If you use IDENTIFIED BY 'password', that signifies that you will be using a plain text password. http://dev.mysql.com/doc/refman/5.1/en/create-user.html Daria_Alexeeva 2013-12-23 15:06:18 UTC #3 Good aftetnoon, Mr Force Flow! I read the article from your link, but I would like to ask you something else. I understand that the option "IDENTIFIED BY PASSWORD 'password'" is better because it is more secure than option "IDENTIFIED BY 'password'" - is this correct? Still I have some questions: 1) I should point out to the host when creating an account, for example, "localhost" or not? 2) I should specify the privileges of the user using the operator "GRANT" or not? If Yes, what should be specifically specify to fully use MySQL: edit and much more (have the right to full administration site)? Thanks in advance for your help! Daria_Alexeeva 2013-12-24 13:06:54 UTC #4 Please help me someone to understand my previous questions on this topic! Thanks in advance for your help! Mittineague 2013-12-25 06:22:56 UTC #5 Sorry, it's a Holiday and I'm not quite on the same page yet. Maybe this will help CREATE USER user [IDENTIFIED BY [PASSWORD] 'password'] [, user [IDENTIFIED BY [PASSWORD] 'password']] .........The CREATE USER statement was added in MySQL 5.0.2. This statement creates new MySQL accounts. To use it, you must have the global CREATE USER privilege or the INSERT privilege for the mysql database.......The account can be given a password with the optional IDENTIFIED BY clause. The user value and the password are given the same way as for the GRANT statement. In particular, to specify the password in plain text, omit the PASSWORD keyword. To specify the password as the hashed value as returned by the PASSWORD() function, include the PASSWORD keyword. So first questionn, you have the global CREATE USER privilege? cpradio 2013-12-25 11:07:45 UTC #6 Daria_Alexeeva said: Good afte