PhpMyAdmin security warning for configuration file

2019-04-05 04:47发布

问题:

Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'.

I got this when I opened up phpmyadmin ...

Any way to fix this?

回答1:

It's just a warning to show that there is no password for the default user root. If you want to set password for root:

  1. Open phpmyadmin interface
  2. Click "Users" tab
  3. Select user "root"
  4. Edit Privileges
  5. Change password


回答2:

Sure, set up a password for user root.

You can do that two ways, using the console and typing something like:

mysqladmin -u root password NEWPASSWORD

Or you can go through phpMyAdmin interface, go to users, select root and change it's password.



回答3:

The message simply warns you that you are using the default MySQL user (username root with no password) to get complete acces to MySQL server.

Just change your MySQL server root password and edit your PhpMyAdmin configuration to include the new password.

If you get this on a local machine not accessible from outside (i.e. your personal local development server), you should not worry about that.