i was trying to set a password for a db_table in phpmyadmin
i tried inserting this below code in the “sql” tab
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
and unfortunately it has set the password for the root
now everytime i go to localhost/phpmyadmin, i m prompted for the password.
My “config.php” doesnt show password 123456
CANT FIND WHERE IS 123456 GOT INSERTED
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
/*
* End of servers configuration
*/
?>
The password would not be stored in the config.inc or config.inc.php file at all.
In order to create a password for a particular database, you would have to create a separate user and password for that database (within mysql).
You should not be using ROOT except for administrative tasks in mysql.
Also note, by default, mysql (and by extension phpmyadmin) come with the root user with no password at all. since many people don’t bother to change that you are leaving your database open to attack, so it is good you assigned a password to the root user (albeit a simple one).
Hello - I hope this question is related. I recently purchased Novice to Ninja (PHP and mySQL). I’m trying to follow the instructions to the tee and I’ve hit a wall when I try to launch the phpMyAdmin.
I set a “root password” through the XAMPP security dashboard (windows). I don’t think this is the same password as the phpMyAdmin prompt. I don’t remember seeing any instructions to set a phpMyAdmin username or password and I can’t log in.
I searched the forums to no avail, could anyone help me please?