• CentOs 安装 Mysql


    本文源于 网上, 我只是加以验证:

    https://blog.csdn.net/czmchen/article/details/46645763

    https://jingyan.baidu.com/article/86fae346aa437f3c48121a5b.html

    1:  安装nysql

    # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
    # rpm -ivh mysql-community-release-el7-5.noarch.rpm
    # yum install mysql-community-server

    2:  启动

    # service mysqld restart

    3: 进入MySQL 并修改密码:

    mysql -uroot
    use mysql;
    update user set password=password('123456') where user='root';
    flush privileges;

    4: 远程授权访问;

    授权:
    grant all on *.* to 'root'@'%' identified by 'password' with grant option;
    //允许账户root从任何主机连接到所有数据库(*.*)
    grant all on test.* to 'user'@'%' identified by 'password' with grant option;
    //允许账户user从任何主机连接到test数据库(test.*)
    flush privileges; //刷新系统授权表

    5: 退出

    exit ;
  • 相关阅读:
    mac重启nginx时报nginx.pid不存在的解决办法
    js 正则表达式
    js 闭包
    js yarn
    js npm
    vue3 vite
    node 错误处理
    node fs
    linux包管理工具使用和区别(转)
    MySQL数据库学习----理论基础
  • 原文地址:https://www.cnblogs.com/sanmubird/p/8994679.html
Copyright © 2020-2023  润新知