1:初始化root密码mysqladmin -uroot password quot;initpasswordquot;2:修改密码mysql -uroot -p password quot;newpassword
1:初始化root密码
mysqladmin -uroot password "initpassword"
2:修改密码
mysql -uroot -p password "newpassword"
Enter password:[ enter old password ]
3:建用户赋予单个库的任意连接权限
create database newdb;
grant select, insert, update, delete,create,alter,index,drop on newdb.* to 'user'@'%' identified by '123456';