Support » Everything else WordPress » xampp and MySQL and root password

  • Resolved xmatter


    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 approach (changing password to something else and also to empty)

    Any help is appreciated!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    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?

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Bear in mind I’m a Unix girl 😉

    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

    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?

    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

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    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.

    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

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

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

    [edit] (probably no difference?)

    thanks, but same error

    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

    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 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!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘xampp and MySQL and root password’ is closed to new replies.