Adding a root user to Laravel Homestead 2.0

So i needed to have the root user to exist in laravel homestead since I needed it for allot of legacy projects that still use the root user with no password for local development. And to save myself ALOT of time to change the password for every project. Here is a quick line to drop into your homestead mysql box.

  1. Open homestead homestead ssh
  2. Open mysql mysql -uhomestead -p and for the password enter secret
  3. Now copy and paste the following query:
UPDATE mysql.user SET password = '' WHERE user='root';  

And your done! now you can simply use the root user with no password.