SHA1 returns binary value
SHA1 returns binary value
am 17.09.2010 14:08:31 von Tompkins Neil
--001636ed6fc2d413b40490736b34
Content-Type: text/plain; charset=ISO-8859-1
Hi
Why when I run the command (MySQL 5.1) SELECT SHA1('abc'); is it returned as
a binary value and not a string value ?
Cheers
Neil
--001636ed6fc2d413b40490736b34--
Re: SHA1 returns binary value
am 17.09.2010 14:24:19 von Aveek Misra
Use UNHEX(SHA1('abc')) to get the string value
On Sep 17, 2010, at 5:38 PM, Tompkins Neil wrote:
> Hi
>=20
> Why when I run the command (MySQL 5.1) SELECT SHA1('abc'); is it =
returned as
> a binary value and not a string value ?
>=20
> Cheers
> Neil
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: SHA1 returns binary value
am 21.09.2010 01:01:56 von Paul DuBois
On Sep 17, 2010, at 7:08 AM, Tompkins Neil wrote:
> Hi
>=20
> Why when I run the command (MySQL 5.1) SELECT SHA1('abc'); is it =
returned as
> a binary value and not a string value ?
If you mean, why is it a binary rather than a nonbinary (character) =
string,
that's true of most of the encryption or compression functions in 5.1. =
This was changed
in 5.5. http://dev.mysql.com/doc/refman/5.5/en/encryption-functions. html =
says:
"
Many encryption and compression functions return strings for which the =
result might contain arbitrary byte values. If you want to store these =
results, use a column with a VARBINARY or BLOB binary string data type. =
This will avoid potential problems with trailing space removal or =
character set conversion that would change data values, such as may =
occur if you use a nonbinary string data type (CHAR,VARCHAR, TEXT).
Some encryption functions return strings of ASCII characters: MD5(), =
OLD_PASSWORD(), PASSWORD(), SHA(),SHA1(). As of MySQL 5.5.3, their =
return value is a nonbinary string that has a character set and =
collation determined by the character_set_connection and =
collation_connection system variables. Before 5.5.3, these functions =
return binary strings. The same change was made for SHA2() in MySQL =
5.5.6.
"
--=20
Paul DuBois
Oracle Corporation / MySQL Documentation Team
Madison, Wisconsin, USA
www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
MySQL Error 1045
am 21.09.2010 04:58:03 von Tim Thorburn
--------------010706000206070405060604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
A few days ago I ran into Error 1045 when attempting to add a new
database user to my development machine. The error only occurred when
trying to connect to the database as a new user which I found a little
odd. After searching Google I discovered that this error is caused by a
timeout - I should probably mention that my development machine is Win7
Ultimate 64-bit; I was using MySQL 5.1.45.
Having no luck solving error 1045 I chose to uninstall MySQL and
re-install the most up to date version from mysql.com being 5.1.50,
again choosing Windows 64-bit. To uninstall I first went to the control
panel to remove MySQL, however this did not remove the Windows service.
I did find that running the installer file will remove existing services
- which is how I was finally able to remove it. I believe I've now
gotten as close to a clean uninstall of MySQL as I can at this point.
When I run the installer now it gets up to the final processing
configuration stage, but when it attempts to apply security settings I'm
again presented with the dreaded error 1045 Access denied for user
'root@localhost' (using password: YES).
The error message goes on to suggest that I open TCP port 3306 in my
firewall. This machine came pre-installed with McAfee AntiVirus Plus -
for good or bad it's worked fine for me up until this point. I've
opened port 3306 under Ports and System Services; yet the error still
persists.
Any thoughts on what I can do now?
TIA,
-Tim
--------------010706000206070405060604--
Re: MySQL Error 1045
am 21.09.2010 05:25:25 von Tim Thorburn
--------------060907070300020409070304
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Ignore that ... it's amazing how you can solve problems with enough
caffeine and enough time away from a computer screen >.>
On 9/20/2010 10:58 PM, Tim Thorburn wrote:
> Hello,
>
> A few days ago I ran into Error 1045 when attempting to add a new
> database user to my development machine. The error only occurred when
> trying to connect to the database as a new user which I found a little
> odd. After searching Google I discovered that this error is caused by
> a timeout - I should probably mention that my development machine is
> Win7 Ultimate 64-bit; I was using MySQL 5.1.45.
>
> Any thoughts on what I can do now?
>
> TIA,
> -Tim
>
>
--------------060907070300020409070304--
Re: MySQL Error 1045
am 21.09.2010 07:38:41 von Jigal van Hemert
Hi,
On 21-9-2010 5:25, Tim Thorburn wrote:
> Ignore that ... it's amazing how you can solve problems with enough
> caffeine and enough time away from a computer screen >.>
It's also amazing how frustrating it is for those who are searching for
the problem you mentioned to only find threads with 'solutions' such as
"ignore this", "found it myself", "never mind, solved", etc.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org