CentOS6.5安装配置MySQL

  1. 安装
    yum install mysql mysql-server

  2. 开启服务
    service mysqld start

  3. 修改密码
    mysqladmin -u root password '123456'

  4. 登录
    mysql -uroot -p

  5. 删除无效用户
    delete from user where password='';

  6. 设置root远程登录
    update user set host ='%' where user='root';

  7. 刷新权限
    flush privileges;

  8. 关闭防火墙
    临时关闭 service iptables stop
    永久关闭 chkconfig iptables off

posted @ 2018-07-10 21:58  liuxining  阅读(100)  评论(0编辑  收藏  举报