How to add google reCAPTCHA to phpmyadmin login screen?

Answered

i want to secure my phpmyadmin from false login attempts , so i was thinking of how to add google reCAPTCHA to the login page to make it secure. so any idea how to do it?

Supporter Asked on December 1, 2016 in Software.
Add Comment
1 Answer(s)
Best answer

ya its good thinking to add google reCAPTCHA to phpmyadmin login page to make it secure.  To add reCAPTCHA first make sure you have latest version of phpmyadmin installed as older version not support reCAPTCHA.

first signup for google recaptcha by visiting :: https://www.google.com/recaptcha/
add one of your website domain there  and  get sitekey and secret key  , on that domain settings page goto bottom of page and  click Advance Settings  then you will see Domain Name Validation heading and with it you will see checkbox :: Verify the origin of reCAPTCHA solutions    , so uncheck that checkbox and save settings.

so to upgrade phpmyadmin to latest version check ::  https://answers.w3db.xyz/question/how-to-upgrade-phpmyadmin-to-latest-version/ 

once you have latest version of phpmyadmin or above 4.5  then login to ssh and edit

 

cd /usr/share/phpmyadmin/
nano /config.inc.php
vim /config.inc.php   # if nano is not installed try to edit with vim
cp config.sample.inc.php config.inc.php   # if no config.inc.php file is there then run it will create config.inc.php file then edit it with nano or vim

in config.inc.php file add these two lines somewhere top or bottom or middle or below $cfg[‘blowfish_secret’]

$cfg['CaptchaLoginPublicKey'] = 'paste here site key here you get from google in above step';
 $cfg['CaptchaLoginPrivateKey'] = 'paste here secret key you get from google in above step ';

save it , and logout from phpmyadmin now you will see google recaptcha on login screen

 

Supporter Answered on December 1, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.