does anyone know how to connect
Connect 41-byte hash password in 4.1.1 mysql?
Below don't work
<?php
$connect=mysql_connect('localhost','user','pass');
mysql_select_db('db');
?>
does anyone know how to connect
Connect 41-byte hash password in 4.1.1 mysql?
Below don't work
<?php
$connect=mysql_connect('localhost','user','pass');
mysql_select_db('db');
?>
hmm... what does 41 bytes have to do with connecting to a database server, and selecting a database?
default at 4.1.1
"IF" you create/change password at
Phpmyadmin/mysql admin/mysqlcc
they are 41 bytes, and this
*43ndgfrbd7465ncfyhdjkfhi4746....
(41 character)
is not the OLD_PASSWORD()
16 btyes
07cjd89dvjd
i can connect using this if 16 btyes
<?php
$connect=mysql_connect('localhost','user','pass');
mysql_select_db('db');
?>
But not if it 4.1.1 Password()
i only knew how to convert back from 41 => 16
but it will be very troublesome to do so everytime creating a new user
and obviously why 41 is out is because secruity issue
so i just wondering how is it possible to connect that
*43ndgfrbd7465ncfyhdjkfhi4746....
from PHP, and how to do that
I have the same exact problem/issue.
Any suggestions on how to send the password in a hash to the db to get connected??
If you create the user that you are trying to connect to and use the PASSWORD option in the IDENTIFIED BY clause it further encypts the password and you will not be able to connect....
the simple solution is to use th standard grant syntax to create a user you can connect to or use the ALTER USER syntax to change the password
so using the alter syntax, and still storing the password in the password() 41 bit encrypted format...how does one pass the password from the web script to connect to the db?
as far as i can tell, there is no way to match the same encryption!?!
Have you upgraded the db recently? If you did, have you upgraded the mysql client program as well, prev versions of mysql cannot use the 41 byte hash, but they can use the 16 byte hash...
The password hashing mechanism was updated in MySQL 4.1 to provide better security and to reduce the risk of passwords being intercepted. However, this new mechanism is understood only by the 4.1 server and 4.1 clients, which can result in some compatibility problems. A 4.1 client can connect to a pre-4.1 server, because the client understands both the old and new password hashing mechanisms. However, a pre-4.1 client that attempts to connect to a 4.1 server may run into difficulties. For example, a 4.0 mysql client that attempts to connect to a 4.1 server may fail with the following error message:
from the manual
ah hehe i saw bastien again ~
actually i mean connecting from php
i'm on 4.1 but all my password using 16bytes.........