3 Automatic phpMyAdmin Q&A
Arnaud Lier edited this page 2024-05-09 20:19:01 +00:00

Q: How can I connect with the default authentication interface of phpMyAdmin alongside the automatic connection from Pterodactyl?

With the use of signon for the authentication mode, it is impossible to put in addition the cookie mode which is the one which allows the usual connection. To solve this problem, you have to make a new connection host but not specify the authentication mode.

Example:

$i = 0;

/**
 * First server used for normal connection.
 */
$i++; // <- We increment of 1 the $i value, so this configuration as the ID of 1.
$cfg['Servers'][$i]['verbose'] = 'example-database'; 
$cfg['Servers'][$i]['host'] = 'localhost';

/**
 * Second server used for connection with Pterodactyl
 */
$i++; // <- We increment again the $i value of 1, so this configuration as the ID of 2.
$cfg['Servers'][$i]['verbose'] = 'example-database (Connection with Pterodactyl)'; 
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['auth_type']     = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'TokenSession';
$cfg['Servers'][$i]['SignonURL']     = 'token.php';
$cfg['Servers'][$i]['LogoutURL']     = 'token-logout.php';

Now you can also connect to your database with the default phpMyAdmin login form.

In this case, the phpMyAdmin Server ID field in Pterodactyl needs to be set to 2, since the ID for the connection with Pterodactyl is also 2.

Q: Why should I put a . at the beginning of my domain name when my Pterodactyl and phpMyAdmin installation are on a different subdomain?

Let's say your Pterodactyl installation is on the subdomain panel.example.xyz, and your phpMyAdmin installation is on the subdomain database.example.xyz. You'll need to use .example.xyz as the cookie domain in Pterodactyl and phpMyAdmin. Like this, the addon will be able to work on your two installations on two different subdomains.

Q: How to generate an Encryption Key and IV?

Those are only really useful on HTTP without any TLS certificate, but who doesn't like some extra encryption? To generate them, you can use a password generator website like LastPass. For the Encryption Key, it can be as long as you want with any characters. But the Encryption IV needs to be made of exactly 16 digits.