zoukankan      html  css  js  c++  java
  • linux快速安装mysql教程

    #安装mysql服务器:
    yum install mysql-server
    #设置开机启动
    chkconfig mysqld on
    #现在启动服务
    service mysqld start
    #设置root初始密码
    mysqladmin -u root password 'xxxxxxx'
    #登录
    mysql -uroot -pxxxxxxx

    ========================================================over

    为了公网上其他电脑可以连接该mysql。

     

    #设置linux防火墙端口
    sudo vi  /etc/sysconfig/iptables
    #加入:
    -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
    #重启防火墙
    service iptables restart
    
    #设置权限
    create user lhc identified by 'lihongchao';
    grant all privileges on *.* to 'lhc'@'%'identified by '***' with grant option;
    flush privileges;
    mysql -h### -uroot -p#### -P3306
    
    
    #如果是mysql所在的主机,又连在路由器的局域网内,则需要:路由器端口映射
    #https://blog.csdn.net/sinat_21125451/article/details/68924671
  • 相关阅读:
    场景调研
    12.8
    12.7
    12.6
    12.5
    12.4
    12.3
    重启oracle数据库的操作方法
    oracle创建dblink方法
    SQL*Loader 详解
  • 原文地址:https://www.cnblogs.com/andylhc/p/9340652.html
Copyright © 2011-2022 走看看