Hosting Question? Find the Solution -

KNOWNHOST KNOWLEDGE BASE

Browse our Guides, Articles, and How-To's

How To Enable Auto-Login for PHPMyAdmin Via DirectAdmin?

With the recent influx of cPanel to DirectAdmin migrations, one area of confusion has resulted in PHPMyAdmin access. Let’s clarify the cause of the confusion and a resolution to resolve/prevent it.
Until recently with DirectAdmin, PHPMyAdmin access would require a login. This login would require the database user’s credentials (typically found within the site’s configuration file). So, upon creating a database, a database user, and a database user password in the panel, you could then use these credentials to log into PHPMyAdmin to manage the newly created database.

With cPanel, they would grant access to the cPanel user for all tables created under that cPanel user. Thus, with one click from within the cPanel interface already authenticated as said cPanel user, an end-user would be automatically logged-into PHPMyAdmin with access to all databases for all sites owned by the cPanel user.

When a client would migrate to DirectAdmin, they would attempt to access PHPMyAdmin after logging into the panel and being prompted for login details. They would assume that the DirectAdmin user’s credentials would work, but they would instead need to input the database user’s credentials with DirectAdmin. If they did input the database user’s username and database user’s password to log in, they would then only have access to the databases (typically only one) that that database user would have privileges to access.

To alleviate the confusion and to facilitate the use of PHPMyAdmin, DirectAdmin developers added a PHPMyAdmin SingleSignOn feature that would allow an authenticated user to automatically be logged into PHPMyAdmin with a single click from within the DirectAdmin interface. This feature is disabled by default as of October 2019.

[root@host ~]# /usr/local/directadmin/directadmin c | grep one_click_pma_login
one_click_pma_login=0

Learn, How To Enable Auto-Login for PHPMyAdmin Via DirectAdmin?

First, navigate to /usr/local/directadmin and enable the one_click_pma_login using the following command,

cd /usr/local/directadmin
./directadmin set one_click_pma_login 1 restart
enable phpmyadmin autologin using command

Next, update and rebuild the packages using the following commands,

cd custombuild 
./build update 
./build phpmyadmin
build custom phpmyadmin directadmin

You should see, phpMyAdmin auto-login option at the DirectAdminMySQL Management interface.

one-click-login-to-phpmyadmin-directadmin-mysql-management-interface

Conclusion

Now that we’ve gone over how to enable auto-login for phpMyAdmin via DirectAdmin. Enabling this option will help you eliminate the traditional method to log in to the phpMyAdmin interface using a username and password.

KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests should you need our assistance. You’re not using KnownHost for the best webhosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your webhosting experience.