Log in to the mysql that has been set up in cmd administrator mode,
E.g:
E:\mysql-8.0.11-winx64\bin> mysql -u root -p
Enter your password
mysql>CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql>show databases;
then
mysql>CREATE USER 'root'@'%' IDENTIFIED BY '123456';
mysql>GRANT ALL ON *.* TO 'root'@'%';
mysql>ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';