zoukankan      html  css  js  c++  java
  • MAC 系统环境配置记录

    安装mysql

    brew install mysql

     

     

    We've installed your MySQL database without a root password. To secure it run:

        mysql_secure_installation

     

    MySQL is configured to only allow connections from localhost by default

     

    To connect run:

        mysql -uroot

     

    To have launchd start mysql now and restart at login:

      brew services start mysql

    Or, if you don't want/need a background service you can just run:

      mysql.server start

     

     

    开启安全模式

    mysqld_safe --skip-grant-tables

     

    可以无密码登陆mysql

    mysql -uroot -p

     

    更改mysql 密码

     

     

     

    添加新用户 (mysql 命令行下执行)

    CREATE USER `admin`@`127.0.0.1` IDENTIFIED BY 'admin123';
     
    GRANT `root`@`localhost` TO `admin`@`127.0.0.1`;
     
    SET DEFAULT ROLE `root`@`localhost` TO `admin`@`127.0.0.1`;
     
    GRANT `admin`@`127.0.0.1` TO `root`@`localhost`;

     

     

     

    "

    mysql 安装了最新版本8.x版本后的报错: the server requested authentication method unknown to the client"

    https://blog.csdn.net/youcijibi/article/details/81153789

    删除创建的用户和授权,

      1. 找到mysql配置文件并加入 (/usr/local/etc/my.cnf)

    1. default_authentication_plugin=mysql_native_password

     

  • 相关阅读:
    Python(条件判断和循环)
    大端还是小端
    c语言程序设计 字符串拷贝拷贝演变与初衷
    内存 匹配串
    多态 C2
    多态 C1
    判断是否存在不合法字符(C++)
    va_start、vsprintf、va_end
    java中instanceof用法
    c++ vector相关
  • 原文地址:https://www.cnblogs.com/bandbandme/p/11607832.html
Copyright © 2011-2022 走看看