1,mysql的安装,需要注意:
安装
二:设置root密码
第一次设置
/etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
第二:修改/usr/my.cfn
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
第三:创建用户
insert into mysql.user(Host,User,Password) values("localhost","3123123233",password("123213213"));
赋予权限
update user set host = '%' where user = '3213123123';
GRANT Select,Insert,Delete,Update ON 231313123.* TO 32131231;
mysql设置完成