转载自:MYSQL建库建用户命令
1、登陆MySQL:mysql -u root -p password:输入密码
2、查看用户信息select user,host,password from mysql.user;select user,host from mysql.user;
3、设置密码set password for root@localhost=password('在这里填入root密码');
4、修改密码方法1:mysqladmin -u root -p p[......]