How can i connect to Mysql using hash instead of password?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

How can i connect to Mysql using hash instead of password?

Post by dimitris »

I want to write a connect script which will use an encrypted password for connecting to the db! I am intending to use md5 for encryption!
Any ideas?

Thanks in advance!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: How can i connect to Mysql using hash instead of passwor

Post by Weirdan »

dimitris wrote:I want to write a connect script which will use an encrypted password for connecting to the db! I am intending to use md5 for encryption!
Any ideas?
Simple answer: you can't. Instead you might wan't to look into MySQL's ability to use SSL certificates for authentication and encryption: http://dev.mysql.com/doc/mysql/en/Secure_GRANT.html
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

Re: How can i connect to Mysql using hash instead of passwor

Post by dimitris »

Ok Weirdan! Thanks! I try SSL.
Weirdan wrote:
dimitris wrote:I want to write a connect script which will use an encrypted password for connecting to the db! I am intending to use md5 for encryption!
Any ideas?
Simple answer: you can't. Instead you might wan't to look into MySQL's ability to use SSL certificates for authentication and encryption: http://dev.mysql.com/doc/mysql/en/Secure_GRANT.html
Post Reply