When I try to login using my MySQL login credentials via the login prompt
on the Adminer front page. It looks like no values are passed to MySQL as
a result Adminer reports the user as 'Logged as: @localhost'. Then I only
have guest access.
The only way I have found to gain access to my databases is with an
extension, hard coding the login credentials:
I'm trying to log into my Database system. The PHP code I to try to achieve this is below.
<?phpfunctionadminer_object(){classAdminerSoftwareextendsAdminer{functionname(){// custom name in title and headingreturn"<a href='localhost'>My App</a> Admin";;}functioncredentials(){$DB_USER=$_POST['auth[username]'];$DB_PASSWORD=$_POST['auth[password]'];// server, username and password for connecting to databasereturnarray('localhost',$DB_USER,$DB_PASSWORD);}}returnnewAdminerSoftware;}include"./adminer-4.2.3.php";
When I click the login button, I'm taken to the regular page that lists databases but only datatbases which allow guest access are listed. The only way I am able to log in is to replace the return array with hard coded creds.
returnarray('localhost','user','password');
When using this, whether I enter no creds or the 'user' and 'password' values, hitting the login button takes me to a full list of databases. Then I'm able to use all the feature necessary features.
I have installed an alternative web app which is able to allow login to my database out of the box. As such this striking me as it should be a simple problem to solve, only I'm not getting it.
Thanks.
Last edit: Dies Felices 2015-11-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've just started using Adminer.
When I try to login using my MySQL login credentials via the login prompt
on the Adminer front page. It looks like no values are passed to MySQL as
a result Adminer reports the user as 'Logged as: @localhost'. Then I only
have guest access.
The only way I have found to gain access to my databases is with an
extension, hard coding the login credentials:
Last edit: Dies Felices 2015-07-03
Hi,
I'm trying to log into my Database system. The PHP code I to try to achieve this is below.
When I click the login button, I'm taken to the regular page that lists databases but only datatbases which allow guest access are listed. The only way I am able to log in is to replace the return array with hard coded creds.
When using this, whether I enter no creds or the 'user' and 'password' values, hitting the login button takes me to a full list of databases. Then I'm able to use all the feature necessary features.
I have installed an alternative web app which is able to allow login to my database out of the box. As such this striking me as it should be a simple problem to solve, only I'm not getting it.
Thanks.
Last edit: Dies Felices 2015-11-24
It's
$_POST['auth']['username'], not$_POST['auth[username]'].After alot of try/fail I found the solution to this:
Last edit: Haagen Waade 2023-04-05