zoukankan      html  css  js  c++  java
  • mysql安装(centos7)

    1、下载rpm

    wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

    2、安装rpm

    yum -y install mysql57-community-release-el7-10.noarch.rpm

    3、安装mysql

    yum -y install mysql-community-server

    4、启动mysql

    msystemctl start  mysqld

    5、查看mysql状态

    systemctl status  mysqld

    6、关闭mysql

    systemctl stop  mysqld

    7、重启mysql

    systemctl restart  mysqld

    8、查看mysql默认临时密码

    grep "password" /var/log/mysqld.log

    9、连接mysql

    mysql -uroot -p

    输入原始密码进入

    10、修改密码(大小写和特殊符号)

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

    11、开启远程访问(所有'%'匹配)

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '修改后的密码' WITH GRANT OPTION;

    flush privileges; 

    exit

    12、开放3306端口

    firewall-cmd --zone=public --add-port=3306/tcp --permanent

    firewall-cmd --reload

    13、mysql配置字符编码与超时

    vim /etc/my.cnf

    添加

    wait_timeout=31536000
    interactive_timeout=31536000

    character-set-server=utf8
    collation-server=utf8_general_ci

    下图来自网络:

    13、重启

  • 相关阅读:
    html5——拖拽
    html5——多媒体(四)
    html5——多媒体(三)
    html5——多媒体(二)
    html5——全屏滚动
    html5——web字体
    html5——伸缩比例案例(携程)
    html5——伸缩比例
    html5——伸缩布局
    html5——多列布局
  • 原文地址:https://www.cnblogs.com/sung1024/p/11487772.html
Copyright © 2011-2022 走看看