-2
I made the stupidity of DELETE the root user of my Mysql. I’ve done everything, uninstalled and reinstalled, but nothing works.
At the moment I am creating a virtual machine to use, because I have school tasks to deliver using Java in Eclipse, but in the long run this does not help me.
How can I recreate the user root in Mysql?
Support issues are not in scope (and would duplicate at the time it was accepted), but the solution is simple; call the executable with the flag
--skip-grant-tableswhich you access with any user and password (or empty). Here it goes in the user table and creates a superuser (no need to call root, can for a less manly name) - Then restarts the server without the--skip-grant-tablesand test. The flag simply causes the server to disregard authentication. Just don’t forget to remove the boot after (and obviously don’t with the server exposed on the internet).– Bacco