0

I changed the host password from blank to an actual password in my test environment using the phpmyadmin tool. I restarted mysql and apache in XAMPP control panel and now I'm getting the following errors. enter image description here

I went into config.inc.php and put the password in there

I changed:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = ''; <-I put the new password here

$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = ''; <-I put the new password here

I saved it, restarted mysql and apache in the XAMPP control panel and I am getting the same error. What am I missing?

jd0117
  • 105
  • 9
  • So if you're going to give me a -1, please tell me why. I'm not sure what I'm doing wrong in my questions asking so give me some direction...thx – jd0117 Jun 11 '18 at 20:29
  • I didn't give you the "-1". However, I think it's likely that you don't understand MySQL security. The root user has two logins, one at "localhost" and one at "127.0.0.1". It will use one or the other depending on DNS resolv.conf. Login via phpmyadmin again and do this: "select, user, host, password from mysql.user;" If you see one of the root logins with a password and the other without, you have your answer. In MySQL, root@'oneip' is a completely different user from root@'another-ip". – T Gray Jun 11 '18 at 20:42
  • you are absolutely right - I don't understand MySQL security very well. I am still learning. Thank you for the info. Unfortunately I am locked out of phpmyadmin. The error above is what I get when I try to gain access. – jd0117 Jun 11 '18 at 20:49
  • Try using the mysql command line and logging in to both root@localhost and root@127.0.0.1 with and without the password. In order to do this, you have the mysql client: mysql -u root -p -h 127.0.0.1 -A. The -h indicates the ip or host name, so you could then try mysql -u root -p -h localhost. The -p indicates it expects a password and will prompt for it. You can try without the -p as well. Once you know which password you changed, you're in business. – T Gray Jun 11 '18 at 20:54
  • thank you so much - so I tried the prompts on the command line. For each one, I got the error 'host: 'localhost' is not allowed to connect to this mariaDB server'. – jd0117 Jun 11 '18 at 20:58
  • I have never used XAMP, so there maybe something in the DB call I'm not familiar with. What error response did you get? – T Gray Jun 11 '18 at 21:00
  • This may help: https://stackoverflow.com/questions/24566453/resetting-mysql-root-password-with-xampp-on-localhost – T Gray Jun 11 '18 at 21:02
  • Okay - thank you T Gray....I think I'm getting somewhere with that link. As per instructions on the link, I tried mysqladmin.exe -u root password and was prompted for a new password but then once I hit enter, I got an error message telling me to use flush-privileges. so then I tried mysqladmin.exe flush-privileges password and was given the error 'you are using mariadb as an anonymous user and anonymous users are not allowed to modify user settings'. Have you come accross this before? – jd0117 Jun 11 '18 at 23:17
  • okay - I've got it all sorted this morning. Thanks so much for all your help. I think in my last comment the solution was restarting mysql again. I thought I already did this but I tried again this morning and it all is working now. Phew....:) – jd0117 Jun 12 '18 at 15:05
  • Please make this question as closed – sree Jun 20 '18 at 14:07

0 Answers0