• mysql安装运行(centos)


    http://repo.mysql.com寻找需要的版本

    wget -P /opt/downloads http://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
    rpm -ivh /opt/downloads/mysql57-community-release-el7-11.noarch.rpm

    查看要安装的

    yum repolist enabled | grep mysql.*


    yum install mysql-community-server

    已安装

    yum list installed | grep mysql

    mysqld位置:/usr/sbin/mysqld
    运行文件位置:/usr/bin/mysql
    数据文件存放路径:/var/lib/mysql
    安装路径/var/lib/mysql
    配置文件:/etc/my.cnf
    日志文件:/var/log/var/log/mysqld.log
    服务启动脚本:/usr/lib/systemd/system/mysqld.service
    进程标识文件:/var/run/mysqld/mysqld.pid


    修改配置
    vim /etc/my.cnf

    加入
    validate_password = OFF


    service mysqld restart
    service mysqld status
    cat /var/log/mysqld.log | grep "temporary password" 查看密码并复制
    mysql -u root -p
    输入系统密码

    把临时随机密码改成正式密码

    SET PASSWORD = PASSWORD('123456');

    允许远程访问
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
    flush privileges;

    查看防火墙状态
    systemctl status firewalld.service
    若要远程访问需:
    关闭防火墙
    systemctl stop firewalld.service
    或穿透3306端口
    iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

    systemctl enable mysqld.service
    systemctl start mysqld.service
    systemctl status mysqld.service

  • 相关阅读:
    spark,hadoop集群安装注意
    TFRecord 使用
    python 路径引用问题
    flask使用模板
    tensorflow serving 模型部署
    docker使(二)—发布node应用镜像和容器
    docker使用(一)
    tensorBoard使用
    【疑难杂症】访问所有mapper方法都提醒invalid bound statement (not found)
    win10配置jdk12环境变量
  • 原文地址:https://www.cnblogs.com/wintersoft/p/10705826.html
Copyright © 2020-2023  润新知