Mysql reset root users to default

2019-08-20 03:07发布

问题:

I changed my mysql root user to have a password. Now I am working on a project where a shell script creates database tables dynamically for a team of us. The root user needs to have full access without using a password. I can't find an easy answer to this anywhere to revert the root user back to it's default state with no password? This is all local, security is not a concern. Thanks in advance!

回答1:

This should do the trick:

grant all privileges on *.* to 'root'@'localhost' identified by "" with grant option;


标签: mysql root