#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    MySql help - Reset password broke connection


    Good Afternoon,

    I'm new to PHP and mySql, but I was able to follow instructions and put together a website that up until this point was running smoothly (nickyclasses.com).

    I upgraded my mac os to os 10.6.3 and this is when I noticed I was having some issues.I opened my website files in Dreamweaver to update some content and found that upon testing the updates locally, I would received an error message to the effect of "unable to connect to the database".

    After some research, and because of the fact that I wasn't even able to log in to phpmyadmin with the correct username and password... I found a few sites suggesting that a mysql password reset might help. Using the code listed below, that's what I did, however, after resetting the password I ran into two more problems...

    1. even though I was now able to sign in to phpmyadmin, my websites database had disappeared.

    2. If I went to the live site via Safari or Google Chrome and tried to login to the "Lab Monitor" page, everything seemed to be working fine. But, if I went to the live site via Firefox or Internet Explorer and logged in, it does not work. Even stranger... when I go to my hosting companies site and pull up my database using phpmyadmin through them... I can only sign in with my old username and password and I can see my entire database still there. It almost seems like the password reset created two mysql areas??

    I'm really not sure how else to describe it, but any help on this would be GREATLY appreciated. In the end, I would like to be able to test my website locally again... as well as reconnect the live site to the appropriate mysql database, so that everything works properly again.

    TERMINAL CODE

    Last login: Sat Jan 19 20:00:25 on ttys000
    nicole-beltrans-macbook-pro:~ nickybel$ sudo /usr/local/mysql/support-files/mysql.server stop
    Password:
    Shutting down MySQL
    . SUCCESS!
    nicole-beltrans-macbook-pro:~ nickybel$ sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables
    Starting MySQL
    .. SUCCESS!
    nicole-beltrans-macbook-pro:~ nickybel$ --skip-networking
    -bash: --skip-networking: command not found
    nicole-beltrans-macbook-pro:~ nickybel$ sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables --skip-networking
    Starting MySQL
    SUCCESS!
    nicole-beltrans-macbook-pro:~ nickybel$ mysql
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.5.29 MySQL Community Server (GPL)

    Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql> UPDATE mysql.user SET Password=PASSWORD('casey66')
    -> WHERE User='root';
    Query OK, 4 rows affected (0.00 sec)
    Rows matched: 4 Changed: 4 Warnings: 0

    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.39 sec)

    mysql> exit
    Bye
    nicole-beltrans-macbook-pro:~ nickybel$ sudo /usr/local/mysql/support-files/mysql.server stop
    Shutting down MySQL
    . SUCCESS!
    nicole-beltrans-macbook-pro:~ nickybel$ sudo /usr/local/mysql/support-files/mysql.server start
    Starting MySQL
    .. SUCCESS!
    nicole-beltrans-macbook-pro:~ nickybel$
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,280
    Rep Power
    4279
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Hey r937... the link you sent me is actually another one of my posts on the same problem.

    Do you have any other input on my issue??
    Do you happen to know why I would be able to log in to phpmyadmin with my old username and password through the my hosting company (godaddy) and not be able to log in when I'm testing locally?
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,280
    Rep Power
    4279
    Originally Posted by nickybel
    Hey r937... the link you sent me is actually another one of my posts on the same problem.
    yeah, i know

    i just wanted to make sure that anyone who might take the time to answer your question on this forum is aware of the other thread, in case it's already been answered over there, so that they don't waste their time here

    me, personally, i don't understand godaddy so i can't help you
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    r937

    I hear ya... but I don't think the issue revolves around godaddy at all... I think it has more to do with something that I screwed up in the resetting of the mysql password.

    Maybe you could help with this clarification then...
    and bare with me because as I mentioned I'm a newbie...

    So on my local testing environment (mac os 10.6.3)... I have apache, php, mysql and then I downloaded phpmyadmin. Everything seemed to be working fine as I developed my web pages and tested them locally.

    Then I uploaded the files to the live server... they also had apache, php, and mysql functionality... so everything was working fine "live" as well..


    Then when I went to do some updates on the site... I opened phpmyadmin and tried to login and it wouldn't allow me... so I reset the mysql password and then I could log into phpmyadmin, but there were no databases showing.

    Do you know where the actual mysql database that I created resides? As I can still access it through the godaddy "phpmyadmin" interface... so it's somewhere... I just don't know how to connect to it.

    Does it get turned into a file on my server and removed from mysql? Is that why I can't access it any longer?
  10. #6
  11. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,280
    Rep Power
    4279
    sorry, i'm no good with installations, or with phpmyadmin, or with password issues

    others on this forum will surely step in here soon

    meanwhile, i'd like to point out something...

    bear with me = have patience
    bare with me = let's get undressed together

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo