I've screwed something up and I have no idea how to fix it...

Here's what I've done:

  • opened localhost/phpmyadmin
  • entered the default username and password and logged in
  • added myself as a user and granted myself all privileges
  • deleted the default user
  • closed phpmyadmin

Now when I go to phpmyadmin, I can't login as either! It gives me this error:
#1045 - Access denied for user: 'root@localhost' (Using password: YES)
I also get the same error when I open cmd and type mysql.

Please can somebody help me!

Thanks,

Dan

    By default you mean "root" user? If you added yourself as a superuser, use that as a login. As I see, you are trying to login with "root". I doubt it will give you the same error with both logins. If it doesnt login with the new user then you have set it up badly.

    To recover root, use the instructions here.

      Well... a quick but brutal solution would be to reinstall the database software, but this time omit the "delete the default user" step until you are sure you can login with your own user account.

      That said, if you use the command prompt, perhaps you should supply --user=<username> and --password=<password> as options.

        cahva - I forgot to say that I've tried logging in as the new user and it doesn't work! Also, I've already visited that link and followed the steps but it's still not working.

        laserlight - I'm thinking I might have to just re-install! How annoying!

        By the way, I've been using apache2triad - I realise this is the easy way around and I'm sure you both think it's a bad idea, but do you know of any other decent WAMP solutions? Alternatively, if I remove this an go ahead and install the latest versions of php and mysql, do you know of any good resources for info on how to configure the two?

          It sounds like he's not even getting the login prompts, just as soon as it loads up it's erroring out, like the root user is still set in the .conf file.

            laserlight - I'm thinking I might have to just re-install! How annoying!

            If this is a fresh install of MySQL and what cahva suggested does not work for you, go ahead and reinstall.

            By the way, I've been using apache2triad - I realise this is the easy way around and I'm sure you both think it's a bad idea, but do you know of any other decent WAMP solutions? Alternatively, if I remove this an go ahead and install the latest versions of php and mysql, do you know of any good resources for info on how to configure the two?

            From what I have heard WAMP and XAMPP are good. Personally, I prefer to install Apache and MySQL using their official installers, then install PHP manually using the zip archive.

              Ok, I just uninstalled apache2triad, deleted everything, downloaded WAMP installed it, PHPmyadmin.... and I'm getting the same friggin message!

              I touched something that said something about flushing privilages before things went wrong. Does anyone know how to reset the whole thing?! Did I miss something when I was uninstalling?

                Write a Reply...