Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to set a password for my phpmyadmin.my config.ini file is

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 3.4.10.1 setup script
 * Date: Sun, 22 Jul 2012 11:33:17 +0000
 */

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['nopassword'] = true;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'triple';


/* End of servers configuration */

$cfg['blowfish_secret'] = '500be38d07a469.36176220';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

but the problem is, it letting me in using whatever input as password.like(khfjsdhfj).whats wrong?How can I set it?just for information previously i did not have any password to log in.

share|improve this question

1 Answer 1

The password is saved in the database. You can set the Permissions on your database with a query like this:

GRANT <permissions> ON <database>.<table> TO <user> IDENTIFIED BY PASSWORD '<password>';

You can also try to set the permissions and password with PHPMyAdmin. Look out for the database permissions and set a password there.

The reason why PHPMyAdmin logs you in is that you set

$cfg['Servers'][$i]['nopassword'] = true;   <-- If password fails try 
                                                username and empty Password
...
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'triple';

And you obviously don't have a password on your DB

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.