mysql set root password first time code example
Example 1: mysql set root password
use mysql;
update user set authentication_string=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit
Example 2: firt time root
Step 1: Open a Terminal Window.
Right-click the desktop, then left-click Open in terminal.
Alternately, you can click Menu > Applications > Accessories > Terminal.
Step 2: Change Your Root Password.
In the terminal window, type the following:
- sudo passwd root.