• mysql-8.0.11-winx64 免安装版配置方法


    mysql-8.0.11-winx64.zip  下载地址:https://dev.mysql.com/downloads/file/?id=476233

    mysql-8.0.11-winx64.zip  安装文档:https://dev.mysql.com/doc/refman/8.0/en/windows-create-option-file.html

    基本步骤:

    1.zip下载后解压到目录 C:Program FilesMySQLmysql-8.0.11-winx64  ,新建文件夹data 

    2.新建 my.ini 文件 内容如下:


    [mysqld]

    basedir = C:Program FilesMySQLmysql-8.0.11-winx64
    datadir = C:Program FilesMySQLmysql-8.0.11-winx64data
    port = 3306

    3. 添加环境变量

        操作如下:
        1)右键单击我的电脑->属性->高级系统设置(高级)->环境变量
          点击系统变量下的新建按钮
          输入变量名:MYSQL_HOME
          输入变量值: C:Program FilesMySQLmysql-8.0.11-winx64
          #即为mysql的自定义解压目录。
        2)选择系统变量中的Path
          点击编辑按钮
          在变量值中添加变量值:%MYSQL_HOME%in
          

    4.cmd 以管理员命令运行:

    #切换到bin目录

    C:WINDOWSsystem32>cd C:Program FilesMySQLmysql-8.0.11-winx64in

    #执行安装命令

    C:Program FilesMySQLmysql-8.0.11-winx64in> mysqld install MySQL --defaults-file="C:Program FilesMySQLmysql-8.0.11-winx64my.ini"
    Service successfully installed.

    #初始化MySQL基础数据(很重要***)

    C:Program FilesMySQLmysql-8.0.11-winx64in>mysqld --initialize-insecure

    #启动服务

    C:Program FilesMySQLmysql-8.0.11-winx64in>net start MySQL
    MySQL 服务正在启动 ..
    MySQL 服务已经启动成功。

    使用navicat 用户名root  密码 root 登录 或者 不用密码登录。

    如果 报错2059。修改一下root密码


    C:Program FilesMySQLmysql-8.0.11-winx64in>mysql -uroot
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 11
    Server version: 8.0.11 MySQL Community Server - GPL

    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | mysql |
    | performance_schema |
    | sys |
    +--------------------+
    4 rows in set (0.06 sec)

    mysql> use mysql;
    Database changed

    mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
    Query OK, 0 rows affected (0.20 sec)

    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.04 sec)

     参考文档:https://blog.csdn.net/houxuehan/article/details/49280945

  • 相关阅读:
    PHP官方文档之————secure.php.net.while
    设计模式之————依赖注入(Dependency Injection)与控制反转(Inversion of Controller)
    【精选】Ubuntu 14.04 安装Nginx、php5-fpm、ThinkPHP5.0(已经测试上线)
    PHP 命令行模式实战之cli+mysql 模拟队列批量发送邮件(在Linux环境下PHP 异步执行脚本发送事件通知消息实际案例)
    Visual Studio Code 教程之————入门篇
    Composer学习之————Ubuntu14.04下安装Composer
    Golang入门教程(一)GOPATH与工作空间(Windows)
    流媒体技术学习笔记之(十六)H264编码profile & level控制
    H264编码profile & level控制
    海康中间件测试
  • 原文地址:https://www.cnblogs.com/wei-lai/p/9003144.html
Copyright © 2020-2023  润新知