• Resolved xmatter

    (@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 config.inc.php 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)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Thread Starter xmatter

    (@xmatter)

    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)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    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
    Thread Starter xmatter

    (@xmatter)

    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?

    Thread Starter xmatter

    (@xmatter)

    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)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    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.

    Thread Starter xmatter

    (@xmatter)

    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

    Clayton James

    (@claytonjames)

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

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

    [edit] (probably no difference?)

    Thread Starter xmatter

    (@xmatter)

    thanks, but same error

    Thread Starter xmatter

    (@xmatter)

    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

    Thread Starter xmatter

    (@xmatter)

    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!

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