Thursday, 8 November 2018

MySQL: Phpmyadmin automatic logout time

How can I change the phpmyadmin automatic log out time?
It will log out automatically after 1440 seconds which is very low for me. How can I change the option or remove log in request completely?

 Answers


Create or edit your php.ini file and set this variable value in it:
session.gc_maxlifetime = 1440
The integer is in seconds. 500000 seconds is 5.7 days. Then restart apache.



In PHPMyAdmin 4 this no longer appears in the config.inc.php file. Instead go to PHPMyAdmin in your browser. Ensure you are at the localhost level to see the Settings link. Then set Settings > Features > Change the value of 'Login cookie validity' > Save



For LOCAL installs only, you can remove the login and timeout altogether - this seems to be what you're after. By changing the authorization type to "config" and entering your database username and password in your config file you are automatically logged in. Add to config.ini.php:
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'username';
$cfg['Servers'][$i]['password'] = 'password';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Of-course if you do this on a server on the internet, some cheeky chappy will come along and gleefully download all your passwords and delete your website. This is for a development server running on your own laptop only.



Server:localhost -> Settings -> Features -> General -> Login cookie validity

0 comments:

Post a Comment