Everybody should be careful when dealing with the 'users' & 'privileges', if you're using PhpMyadmin. I had pretty horrendous experience with this.
To be honest, I was removing users & mistakenly removed the root user. Then, I couldn't even load the PhpmyAdmin at http://localhost/phpmyadmin. When I tried, I had the following error.This means that, I don't have any access to mysql server.
MySQL said:
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
After searching for solutions for a little bit of time. I'd found the following solution. I write this blog post , so that it'll be helpful for somebody with the same problem.
Step 01.
First, stop the MySQL service using XAMPP Control Panel.
Step 02
Then, Run Command Prompt & go to the 'mysql' installation directory. In my case, It's C:/xampp/mysql.
cd C:/xampp/mysql
Step 03
Then, locate 'resetroot.bat' file and to edit it with notepad, run the following command in the command prompt.
notepad resetroot.bat
Step 04
Find 'bin\mysqld.exe' in the .bat file & in the same line locate a text simliar to '--no-defaults'. Add the following text after leaving a space. Save the file.
–datadir=c:/xampp/mysql/data
Step 05
Now, run resetroot.bat using Command Prompt. Then, Start MySQL service using XAMPP Control Panel.
That's it. You can reach PhpmyAdmin. Thank You.
18 comments:
This is very helpful! Thanks a lot! :)
thankyou!!!!!!! :D
Thanks, it's work
You're Welcome
Thanks a lot Harsha.It worked for me :)
I'd just discover this useful blog. But still, the same problem persist even i did all what have been thought to me. Anyone, need help please
I'd just discover this useful blog. But still, the same problem persist even i did all what have been thought to me. Anyone, need help please
thanks , it started working
thanks its working
I'd just discover this useful blog. But still, the same problem persist even i did all what have been thought to me. Anyone, need help please
I'd just discover this useful blog. But still, the same problem persist even i did all what have been thought to me. Anyone, need help please
I'd just discover this useful blog. But still, the same problem persist even i did all what have been thought to me. Anyone, need help please
Thank you so much! It works. :)
i dont have the resetroot.bat file
Could you help me out with this in ubuntu?
If you have changed your localhost over different PORT, Then you should SET PORT in config.inc.php file $cfg['Servers'][$i]['host'] = '127.0.0.1:3307'.
In my case I have Set PORT on 3307 in MySQL.ini. So that I fixed my config.inc.php file with following line: $cfg['Servers'][$i]['host'] = '127.0.0.1:3307'
Following fix is working for me.
Thanks It Worked!!!!!
Still problem there pl. help
Post a Comment