I am using rhel 5 and php 5 with mysql 5. My server is already configured and running all applications smoothly. I am accessing mysql as root and password is 'anitha123'. but when i am accessing phpmyadmin through browser, it is not asking for password. Somebody please tell me how can i set it like prompting for username ans password. Since i am not familiar with php mysql please tell me how to do it in simple way.
问题:
回答1:
find phpmyadmin.conf and set auth type it to http
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
回答2:
or simply you can add password into the configuration file of phpmyadmin. for this find config.inc.php file which is in phpmyadmin directory then make these changes
find the line $cfg['Servers'][$i]['password'] = '';
then add your password in blanck field as
$cfg['Servers'][$i]['password'] = 'anitha123';
and it always open with the same username and password
回答3:
Go to phpmyadmin and Make sure you have 3 root user to use mysql smoothly. If you are seeing "No" in Password column set new password by Clicking on Edit Privileges---> Change Password
select Password
option and set your password.(All of three must be set to Password Yes
). While doing this do not refresh you browser other wise you will get an error
xampp mysql Access denied for user 'root'@'localhost' using password: YES
Your users screen must be like this.
User name Host Password Global privileges
root 127.0.0.1 Yes ALL PRIVILEGES Yes
root ::1 Yes ALL PRIVILEGES Yes
root localhost Yes ALL PRIVILEGES Yes
When finish this. Just use this setting-> Open config.inc.php file in the phpmyadmin directory
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
Now open phpmyadmin. phpmyadmin will ask you for password. if you provide correct password,You will be able to login.