Linux上如何安装Mysql数据库并使用?

Linux上安装mysql数据库步骤:

yum -y install mysql-server

chkconfig mysqld on

mysqladmin -u root password '123456'

mysql -uroot -p

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option

delete from user where host='127.0.0.1'

flush privileges

 

另外木有关防火墙的关下防火墙:

    

1。查看防火墙:  service iptables status
2.开启防火墙:service  iptables stop|start|restart
3.关闭:service  iptables stop

 

chkconfig:用于设置服务的开机启动

    查看:chkconfig  --list
            关闭:chkconfig   service_name  off
            开启:chkconfig   service_name  on

 

参考链接:http://www.jb51.net/article/84399.htm

 

posted @ 2017-11-13 14:24  那时的吻狠陶醉  阅读(265)  评论(0编辑  收藏  举报