zoukankan      html  css  js  c++  java
  • Centos7 操作系统 mysql5.7 配置远程登陆操作

    Centos7 操作系统: mysql5.7 配置远程登陆操作:

    首先登陆服务器,进入数据库:

    mysql -u root -p

     show databases;

    use mysql;

     show tables;


    #Field 'ssl_cipher' doesn't have a default value ;

    创建用户时候报错:
    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    解决办法:

    //设置安全级别
    set global validate_password_policy=0;
    //设置最小长度
    set global validate_password_length=4;


    #desc user;
    create user yang IDENTIFIED by '123456';

    select User ,authentication_string,Host from user;

     重要步骤:给新建的用户进行授权  并且可远程访问

    grant all privileges on *.* to 'yang'@'%' with grant option;

    flush privileges;

    ---------

    注意: (1)"%"欲连接到此Mysql数据库的客户端的IP地址,根据需求进行修正即可。%表示全部ip均可连接
               (2)password就是Mysql数据库test用户的password,根据实际情况需要修改
    修改MySQL的配置文件

     /etc/mysql/my.cnf文件,找到bind-address = 127.0.0.1

     将 bind-address = 127.0.0.1 这一行注释掉, 即修改为:

     #bind-address = 127.0.0.1

    最后:

    centos之前的版本的操作命令不一样

    将MySQL服务进行重启

     service mysqld restart  

    service mysqld status 

    centos7 

    systemctl status mysqld.service

    查看状态

    systemctl restart mysqld.service

    重启

    参考文章:

    http://www.cnblogs.com/yoursoul/p/6264059.html

     

  • 相关阅读:
    JSTL标签库
    JavaScript中数组操作
    jquery . fancybox()
    jQuery ajax
    jquery学习笔记2
    codeforces_1066_B.Heaters
    codeforces_1065_D.three pieces_思维
    codeforces_B. Forgery
    codeforces_C. Sequence Transformation
    codeforces_D. Social Circles
  • 原文地址:https://www.cnblogs.com/hanlong/p/6840450.html
Copyright © 2011-2022 走看看