For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > July 2004 > help for a newbie with phpmyadmin









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author help for a newbie with phpmyadmin
Kirk Soodhalter

2004-07-22, 8:55 am

Hi,

I set up and configured phpmyadmin a few days ago. It worked well and I
built some databases, etc. Then I went to bed. The next day, when I
tried to log in, it did not accept my username/password which had worked
the day before. I figure I have done something wrong, but I don't know
where to start in figuring out how do rectify this. Can someone point
me in the right direction as to what to try? I appreciate any help you
give. Thanks.

-Kirk
Savut

2004-07-22, 3:56 pm

You may had messed with the database mysql by setting another password for
root and users without using mysql PASSWORD() function. This can also be
juste a mistapped password when you modified it.

Also PhpMyAdmin had some problem with MySQL 4.1 since they had changed they
password length to a longer hash.
* Prior to MySQL 4.1, password hashes computed by the PASSWORD() function
are 16 bytes long.
* As of MySQL 4.1, the PASSWORD() function has been modified to produce a
longer 41-byte hash

It seem like mysql was compiled to use the old-password way, but the
function PASSWORD() create the long password hash.

Solution :
First you need to reset mysql password, since you have lost root access,
fallow this easy step to do it.
http://dev.mysql.com/doc/mysql/en/R...ermissions.html
Then use OLD_PASSWORD() on a query on the database mysql: UPDATE users SET
password=OLD_PASWORD("mynewpassword") WHERE user='myuser'

References :
http://dev.mysql.com/doc/mysql/en/Password_hashing.html
http://dev.mysql.com/doc/mysql/en/R...ermissions.html

Savut
http://www.savut.com

"Kirk Soodhalter" <newsgroupkirky@sbcglobal.net> wrote in message
news:g2OLc.17926$bM4.7396@newssvr23.news.prodigy.com...
> Hi,
>
> I set up and configured phpmyadmin a few days ago. It worked well and I
> built some databases, etc. Then I went to bed. The next day, when I
> tried to log in, it did not accept my username/password which had worked
> the day before. I figure I have done something wrong, but I don't know
> where to start in figuring out how do rectify this. Can someone point me
> in the right direction as to what to try? I appreciate any help you give.
> Thanks.
>
> -Kirk


Kirk Soodhalter

2004-07-25, 3:55 am

Ok, in the midst of fixing this problem I have somehow managed to create
new problems. I can't even get into mysql with any shell commands any
more. Now when I do, I get this error message:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket:
'/var/lib/mysql/mysql.sock' exists!

mysql.sock is there. When I try to shut the server down using the GUI
tool or the command line, it still does not find the mysql.sock. I am
not sure what to do. I want to just reset everything to defaults and
start over, but I have no idea is this is a good idea or doable. Tell
me what info you might need in order to help me out and I will give it
to you. Thanks for all the help you have given so far!

-Kirk

Savut wrote:

> You may had messed with the database mysql by setting another password
> for root and users without using mysql PASSWORD() function. This can
> also be juste a mistapped password when you modified it.
>
> Also PhpMyAdmin had some problem with MySQL 4.1 since they had changed
> they password length to a longer hash.
> * Prior to MySQL 4.1, password hashes computed by the PASSWORD()
> function are 16 bytes long.
> * As of MySQL 4.1, the PASSWORD() function has been modified to produce
> a longer 41-byte hash
>
> It seem like mysql was compiled to use the old-password way, but the
> function PASSWORD() create the long password hash.
>
> Solution :
> First you need to reset mysql password, since you have lost root access,
> fallow this easy step to do it.
> http://dev.mysql.com/doc/mysql/en/R...ermissions.html
> Then use OLD_PASSWORD() on a query on the database mysql: UPDATE users
> SET password=OLD_PASWORD("mynewpassword") WHERE user='myuser'
>
> References :
> http://dev.mysql.com/doc/mysql/en/Password_hashing.html
> http://dev.mysql.com/doc/mysql/en/R...ermissions.html
>
> Savut
> http://www.savut.com
>
> "Kirk Soodhalter" <newsgroupkirky@sbcglobal.net> wrote in message
> news:g2OLc.17926$bM4.7396@newssvr23.news.prodigy.com...
>
>
>

Savut

2004-07-26, 8:57 am

That happen for the same reason, password is wrong. Mysqladmin need a
correct user and password to connect to a mysql server.

Try reinstalling the database: mysql_install_db

or if this not solve your problem, just reinstall mysql since it's brand
new.

Savut
http://www.savut.com

"Kirk Soodhalter" <newsgroupkirky@sbcglobal.net> wrote in message
news:SPFMc.5313$2Q5.5082@newssvr22.news.prodigy.com...
> Ok, in the midst of fixing this problem I have somehow managed to create
> new problems. I can't even get into mysql with any shell commands any
> more. Now when I do, I get this error message:
>
> mysqladmin: connect to server at 'localhost' failed
> error: 'Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)'
> Check that mysqld is running and that the socket:
> '/var/lib/mysql/mysql.sock' exists!
>
> mysql.sock is there. When I try to shut the server down using the GUI
> tool or the command line, it still does not find the mysql.sock. I am not
> sure what to do. I want to just reset everything to defaults and start
> over, but I have no idea is this is a good idea or doable. Tell me what
> info you might need in order to help me out and I will give it to you.
> Thanks for all the help you have given so far!
>
> -Kirk
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com