I have given root a password in MySQL, but now phpMyAdmin says "access denied".

I've put the following line in config.sample.inc.php:

$cfg['Servers'][$i]['password'] = 'password_goes_here';

but it doesn't seem to make any difference.

How do I get phpMyAdmin to recognise my root password?

Thanks.

🙂

    Well unless you renamed "config.sample.inc.php" to "config.inc.php" then it will make no difference, as phpmyadmin doesn't check for settings in the sample files.

      Thanks. I've now copied and renamed the sample file.

      Now I get phpMyAdmin asking me for a username and password.

      If I type "root" and the password I just created, then it says this:

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

      If I type "pmausr" and "pmapass" (this is what 'controlpass' is set to), I get the same message.

        I suggest you go through the steps in the Documentation.txt file and set it up as stated there, it will save an awful lot of time in the long run.

        BTW pmausr is a usr that needs setting up to use more of the feature of phpmyadmin.

          Thanks. I've read through as much of the Documentation.txt as made sense to me at this stage (which was not all of it, by any means!), and I added this to my config file:

          $cfg['Servers'][$i]['user'] = 'root';
          $cfg['Servers'][$i]['password'] = 'my_root_password';

          But it made no difference.

            Colm Osiris wrote:

            Thanks. I've read through as much of the Documentation.txt as made sense to me at this stage (which was not all of it, by any means!

            Man u are a fast reader, in 21 min top u manage to read the phpmyadmin documentation, nice ... 😃

            I'm pretty sure that phpmyadmin have a help forum ...

              Not really. I read the sections that I understood. There weren't many! 🙂

              But I did read the section about creating a config file.

                if you want to get it to work fully then you need to read the section on creating the PMA tables in mysql and creating the PMAUSR with restricted privileges. Then you will be able to login.

                Or I believe that there is now a GUI installation available through the documentation.html file, you may want to give that a try.

                  I read the section called "Linked-tables infrastructure". Is that what you meant? Unfortunately, I don't understand a word of it.

                  it says "If your MySQL server's version is 4.1.2 or later, please use ./scripts/create_tables_mysql_4_1_2+.sql instead, for a new installation."

                  Use it? How? What do I do with it? Where do I put it? What software do I run it through?

                    PS. The GUI installation (scripts/setup.php) does not work. I tried clicking every button, and the only ones that did anything were 'phpMyAdmin home page' and 'donate to phpMyAdmin'.

                    Not much use, really!

                      If you go to the folder "./scripts/ " you will find the file "create_tables_mysql_4_1_2+.sql" run this from the command line and it will create the PMA tables.

                      You then need to create the user PMA (see the section marked Using authentication modes) and set up the privileges as shown in the examples.

                        Okay, I'm in the right folder in the Terminal. I tried this:

                        exec upgrade_tables_mysql_4_1_2+.sql

                        but it said 'command not found'. So how do I run it, please?

                          Write a Reply...