I have intalled phpmyadmin
recently in my system. Now I lost its username and password. I tried the below methods for login.
in etc/phpmyadmin/config.inc.php
I activated the AllowNoPassword
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
SonalPM
1,3178 silver badges17 bronze badges
asked Oct 14, 2014 at 7:12
4
Step 1:
Locate phpMyAdmin installation path.
Step 2:
Open phpMyAdmin>config.inc.php in your favourite text editor.
Step 3:
$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;
$cfg['Lang'] = '';
answered Oct 14, 2014 at 8:01
Hara PrasadHara Prasad
6646 silver badges13 bronze badges
Try changing the following lines with new values
$cfg['Servers'][$i]['user'] = 'NEW_USERNAME';
$cfg['Servers'][$i]['password'] = 'NEW_PASSWORD';
Updated due to the absence of the above lines in the config file
Stop the MySQL server
sudo service mysql stop
Start mysqld
sudo mysqld --skip-grant-tables &
Login to MySQL as root
mysql -u root mysql
Change MYSECRET with your new root password
UPDATE user SET Password=PASSWORD['MYSECRET'] WHERE User='root'; FLUSH PRIVILEGES; exit;
Kill mysqld
sudo pkill mysqld
Start mysql
sudo service mysql start
Login to phpmyadmin as root with your new password
answered Oct 14, 2014 at 7:38
geoandrigeoandri
2,3302 gold badges14 silver badges28 bronze badges
4
Try opening config-db.php, it's inside /etc/phpmyadmin. In my case, the user was phpmyadmin, and my password was correct. Maybe your problem is that you're using the usual 'root' username, and your password could be correct.
answered Dec 23, 2017 at 16:34
1
If you don't remember your password, then run this command in the Shell:
mysqladmin.exe -u root password NewPassword
where 'NewPassword' is your new password.
answered Oct 14, 2014 at 7:17
Vidhyut PandyaVidhyut Pandya
1,5671 gold badge13 silver badges27 bronze badges
1
I had a problem with this. I didn't even create any passwords so I was confused. I googled it and I found out that I should just write root as username and than click GO. I hope it helps.
answered Jan 30, 2018 at 19:34
1
Hello, I am a beginner.
For checking username and password:
But when I get variables from users it isn't secure.
How can I use '?' and prepare the query and check results?What I have tried:
checking username and password with
bind_paramThis content, along with any associated source code and files, is licensed under The Code Project Open License [CPOL]
CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 [416] 849-8900
How can I find my php username and password?
Try opening config-db. php, it's inside /etc/phpmyadmin. In my case, the user was phpmyadmin, and my password was correct.How do I find my localhost username and password?
The Solution.Go into PhpMyAdmin. The URL should be //localhost/phpmyadmin , but it might vary depending on configurations. ... .Click “wordpress“ to see its tables. Look for *_users , in our case it's called wp1_users . ... .Click on the pen icon to edit the data for the specific user. Look for “ user_pass ” field..How do I find MySQL username and password?
So for example, to show MySQL users' username, password and host, we'll modify the sql query to accordingly as such: mysql> select user, password, host from mysql. user; The above sql query will present you with a list of users and their respective user name, password and database host.