Reputation: 1934
I am new to using phpmyadmin. I am having problemts logging into the phpmyadmin. I managed to log in once, then I deleted (for some reason) a list of users there. Now I cann't log it. It asks for username and password. I try root and no password, it doesnt work. i have read hundreds of posts, and all say to go to config.inc.php file in root xampp folder, I do this. I have changed it many times, I still cannot log in.
Code in config.inc.php is:
/* 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'] = '';
Tried changing auth_type to http, and config, and doesn't help. I have tried adding a password, and tried allownopassword false, doesn't work.
I don't know what to do. Will uninstalling xampp and reinstalling it help?
How can I just reset and start again!
Upvotes: 0
Views: 6850
Reputation: 11
Well, try to use this command in shell:
mysqladmin.exe -u root password NewPassword
If it doesn't work try to reinstall xampp.
Upvotes: 1
Reputation: 15411
From your description, you deleted the users in the data dictionary. You need to fix this and begin by recreating the root user information in the data dictionary.
The question of how to do that has been answered many times. For example here: How can I restore the MySQL root user’s full privileges?
In essence you probably need to stop mysql and start it again with the --skip-grant-tables option. There are several ways to do that, and under windows it is probably good to put that option in the my.cnf file which can be located using this page: https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/
Add skip-grant-tables to the file in the [mysqld] section.
Start the mariadb process, and then follow the directions to INSERT the root user@localhost again.
After you do that, edit the my.cnf again and comment out or remove the skip-grant-tables statement, stop and restart mariadb and things should work again.
Upvotes: 1
Reputation: 26
you can to change the port 3306 to others en config.inc.php (phpadmin file) in the variable $cfg['Servers'][$i]['port']='' and your connect http://localhost:[port] and log
Upvotes: 0