WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] xampp and MySQL and root password (12 posts)

  1. xmatter
    Member
    Posted 3 years ago #

    I am using xampp and phpMyAdmin but forgot the root password to MySQL. When i try to enter the localhost/phpmyadmin address, i get this error:

    #1045 - Access denied for user 'root'@'localhost' (using password: YES)

    i have searched online for a solution, but to no avail.

    I have tried the config.inc.php approach (changing password to something else and also to empty)

    Any help is appreciated!

  2. xmatter
    Member
    Posted 3 years ago #

    thanks for your reply. I have tried this method but there are a lot of obstacles.

    1) I have xampp installed on the F: drive
    2) I am signed into the machine as a Network Admin

    i changed the script to mimic C:> F:\xampp\mysql...... but every time it says that it is a bad command.

    Any thoughts on that?

  3. Bear in mind I'm a Unix girl ;)

    This
    C:\> C:\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt

    should be done ... I think like this:

    Open a DOS window.

    Type F: and hit enter. THAT will change your prompt to F:\> THEN run

    F:\mysql\bin\mysqld-nt --init-file=F:\\mysql-init.txt
  4. xmatter
    Member
    Posted 3 years ago #

    correct, except that mysql is actually inside xampp

    so it would be

    F:>\ F:\xampp\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt

    wouldn't the end "C:" remain C: because that is where i place the temp text file?

  5. xmatter
    Member
    Posted 3 years ago #

    i receive this message no matter which way i try it:

    'F:\> F:\xampp\mysql\bin\mysqld-nt' is not recognized as an internal or external command, operable program or batch file

  6. Is the file there in F:\xampp\mysql\bin\ ?

    (also, try copying the file from C:\\mysql-init.txt to F... But ... that's really a serious mySQL question.

  7. xmatter
    Member
    Posted 3 years ago #

    yes, the mysqld-nt file is in the mysql directory. It has no extension and it's size is 0kb. I did happen to copy the file to the F: and still nothing

  8. ClaytonJames
    Member
    Posted 3 years ago #

    F:\> F:\xampp\mysql\bin\mysqld-nt

    Try: F:\>\xampp\mysql\bin\mysqld-nt

    [edit] (probably no difference?)

  9. xmatter
    Member
    Posted 3 years ago #

    thanks, but same error

  10. xmatter
    Member
    Posted 3 years ago #

    i have also tried the skip-grant-tables which allowed me to get to the phpmyadmin page and enter MySQl, but could not change any passwords

  11. xmatter
    Member
    Posted 3 years ago #

    ok so here goes.

    1)I shut down the mysql service, opened the mysql shell and typed: mysqld --skip-grant-tables

    2)Then went to localhost, and clicked phpMyAdmin (which allowed me in)

    3)Selected "MySQL" from left column, then click the SQL Query button at the top, which opens a new window

    4)Typed this: UPDATE user SET password=PASSWORD("abcd") WHERE user="root";
    FLUSH PRIVILEGES; and clicked Go (worked)
    5)Restarted the APache and MySQL services
    6)Edited the config.inc.php file to match passwords.
    7)Restarted both services again and went back into phpMyAdmin and it took

    For some reason the password never stuck. Well... there it is, thanks for all your help guys and girls!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.