Showing posts with label Mysql Admin login. Show all posts
Showing posts with label Mysql Admin login. Show all posts

Thursday, 19 December 2019

Mysql - How to reset the administrator password in ISPConfig 3

If you lost your ISPConfig 3 administrator password, you can reset it with the following SQL query.
UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';
The SQL query sets the password to "admin" for the user "admin", it has to be executed in the ISPConfig mysql database, e.g. with phpmyadmin. If you dont have phpmyadmin installed, then the query can be executed with the mysql commandline utility as well:
Login to the mysql database.
mysql -u root -p
Then enter the password of the mysql root user. To switch to the ISPConfig database, run this command:
use dbispconfig;
And execute the SQL command:
UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';
Finally close the mysql shell:
quit;

Thursday, 8 November 2018

Mysql: PhpMyAdmin disable admin login

I have Ubuntu, and installed the phpMyAdmin package (currently 4:3.3.2-1). Every 30 minutes, it asks me to enter my username and password, for inactive session timeout. In earlier version of phpMyAdmin, setting a user/pass would entirely skip this login form and keep the session open indefinitely. This installation is on a dev machine (single user on closed private network) and I want to disable, or bypass that login form so I never have to actually input the user/pass again. I tried fiddling with the configuration files (there are like 3, not even sure which one is used) but nothing seems to change.

 Answers


Open config.inc.php on my debian instalation i can find it at /usr/share/phpmyadmin/config.inc.php. Change auth_type and add in the first element on the array like this $cfg['Servers'][1] any data (like a host in $cfg['Servers'][1]['host']) need to auth.
EDIT:
Add this lines before first for statement in config.inc.php:
$cfg['Servers'][1]['auth_type'] = 'config';
$cfg['Servers'][1]['host'] = 'localhost'; //edit if you have db in the other host
$cfg['Servers'][1]['connect_type'] = 'tcp';
$cfg['Servers'][1]['compress'] = false;
$cfg['Servers'][1]['extension'] = 'mysql';
$cfg['Servers'][1]['user'] = 'root'; //edit this line
$cfg['Servers'][1]['password'] = ''; // edit this line



In my case (Ubuntu 12.04, phpMyAdmin 4) I must edit same file /etc/phpmyadmin/config.inc.php
And I add:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'MyPassword';
AFTER
/* Authentication type */
comment (about line 107)



As an addition to kachar and matthy's answer if you have have phpmyadmin/config.sample.inc.php instead of phpmyadmin/config.inc.php please rename the sample file. It solves in my case and detected as config file.