SQL query:
ALTER USER \'root\'@\'localhost\' IDENTIFIED WITH mysql_native_password BY \'YourRootPassword\'; -- then FLUSH PRIVILEGES;