1 2 3 4 5 6 7 8 9 10 11 12 13 14
| mysql -uroot -p
>mysql use mysql; >mysql select host, user, pulgin from user;
>mysql grant all on *.* to 'root'@'%'; flush privileges;
>mysql alter user 'root'%'%' identified with mysql_native_password by '{your_password}'; flush privileges;
>mysql create schema B default character set utf8mb4 collate utf8mb4_general_ci;
>mysql create user 'A'%'%' identified by '{B_password}';
>mysql grant all on B.* to 'A'%'%'; flush privileges;
|