1、Mysql运行状态

service mysqld status

service mysqld start

service mysqld stop

2、查看SQL进程,清理SQL进程

show full processlist

kill 2920578

3、账号创建、数据库授权

CREATE USER 'u_app'@'%' IDENTIFIED BY '123456';
grant all privileges on testDB.* to u_app@% identified by '123456';

4、密码修改

>mysql -u root -p123456 -h127.0.0.1

>use mysql;

> update user set password=PASSWORD("123456")where user="root";

 即更改密码为 123456

> flush privileges; 更新权限

> quit 退出

5、免密登陆(root密码忘记)

6、彻底删除mysql

7、

 

 

07-18 09:17