when i open localhost/phpmyadmin/ in xampp it opens directly the home page with root as user but not a login page. My page looks same as in here in this link how can I get a login page, what are the setting I should do to get a login page
5 Answers
Step 1:
Locate phpMyAdmin installation path.
Step 2:
Open phpMyAdmin/config.inc.php in your favourite text editor. Copy config.sample.inc.php to config.inc.php if it's missing.
Step 3:
Search for $cfg['Servers'][$i]['auth_type'] = 'config';
Replace it with $cfg['Servers'][$i]['auth_type'] = 'cookie';
-
i have another problem can u help – Rakhi Jul 20 '13 at 08:06
-
http://alandoyle.com/tutorials/configuring-phpmyadmin-for-multiple-users/ , I studied this link and did but its showing error when I am writing in sql query window – Rakhi Jul 20 '13 at 08:44
-
how can one user can access its own database assigned to them? – Rakhi Jul 20 '13 at 09:11
Ya, it's working fine, but it can enter into localhost without entering password.
You can do it in another way by following these steps:
In the browser, type: localhost/xampp/
On the left side bar menu, click Security.
Now you can see the subject table, and below the subject table you can see this link:
http://localhost/security/xamppsecurity.php. Click this link.Now you can set the password as you want.
Go to the xampp folder where you installed xampp. Open the xampp folder.
Find and open the phpMyAdmin folder.
Find and open the config.inc.php file with Notepad.
Find the code below:
$cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true;Replace it with the code below:
$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false;Save the file and run the localhost/phpmyadmin with the browser.
-
1I got login option after your steps. I have skipped your steps from 1 to 4. – Web_Developer Jul 08 '15 at 10:39
-
You can use
- Go browser & type localhost/phpmyadmin/
- Go to User accounts
- Edit privileges from marked bellow image in last options root->localhost-> Yes->ALL PRIVILEGES->Yes-> Edit privileges
- you can click on Edit privileges last option above image
- Then you can click on Change password. It shows enter password screen
- Enter your password & retype your password in password the field
- Then click on GO
- Then Go to XAMPP->xamppfiles->config.inc.php
- Open config.inc.php file & go to /* Authentication type */ sections
change config to cookie & type your password in ' ' in password like bellow
$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'your password';Then save & type on browser localhost/phpmyadmin/
Enter your given password & enjoy
- 4,789
- 1
- 37
- 50
-
If you are setting `$cfg['Servers'][$i]['auth_type'] = 'cookie';` it will ask for a password on the login page, so there is no point putting the password in `$cfg['Servers'][$i]['password'] = 'your password';` as it will just be ignored – RiggsFolly Sep 09 '20 at 12:02
Can you set the password to the phpmyadmin here
http://localhost/security/index.php
- 1,812
- 4
- 35
- 60
-
I have done some changes login page appears but I cannot see my home page now , it shows some error MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: YES) – Rakhi Jul 20 '13 at 07:42
-
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. – Rakhi Jul 20 '13 at 07:45
-
-
1found answer in here https://stackoverflow.com/questions/2341504/how-to-configure-config-inc-php-to-have-a-loginform-in-phpmyadmin – Dung Dec 11 '18 at 17:38
If you wish to go to the login page of phpmyadmin, click the "exit" button (the second one from left to right under the main logo "phpmyadmin").
- 71
- 1
- 11
