#登录
Mysql-uroot-p123
#查看用户
Select User ();
#退出
Quit
Exit
\q
#查看帮助信息
Help create user;
#创建账号
Create user ' Egon ' @ ' 192.168.11.* ' identified by ' 123 ';
Create user ' Egon ' @ ' 192.168.11.1 ' identifled by ' 123 ';
Create user ' Egon ' @ '% ' indenrified by ' 123 ';
#授权
Grant all privileges
Grant all on db1.t1 to ' Egon ' @ '% ';
Grant all on * * to ' egon ' @ '% ';
Refresh
Flush privileges;
#创建账号同时授权
Grant all on * * to ' DJJ ' @ ' percent ' identified by ' 123 ';
Flush privileges;
#远程连接mysql
show databases;
#修改密码
Command line "Mysqladmin-uroot-p ' 123 ' password 123
Command line "\mysql-uroot-p123
#破解密码
Kill MySQL Service
>tskill |findstr MySQL
>tskill mysqld
>tskill-f/pid 5320
>mysql--skip-grant-tables #跳过授权表启动
Mysql>update mysql.user Set Password =password (") where user= ' root ' and host= ' localhost ';
MySQL >flish privileges;
Tskill mysqld
tasklist |findstr MySQL
Mysqld
Sign in with a new password
MySQL Basic use