查看: 609|回复: 0
打印 上一主题 下一主题

[MySQL] MySQL 8.0 for Windows 解压缩版配置安装

[复制链接]
  • TA的每日心情
    开心
    2017-7-5 20:14
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    1698

    主题

    1707

    帖子

    7350

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    7350
    跳转到指定楼层
    楼主
    发表于 2019-4-19 17:17:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

    mysqld --initialize-insecure --console

    新建my.imi文件,内容如下
    1. # For advice on how to change settings please see
    2. # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
    3. # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
    4. # *** default location during install, and will be replaced if you
    5. # *** upgrade to a newer version of MySQL.
    6. [mysql]
    7. # 设置mysql客户端默认字符集
    8. default-character-set=utf8

    9. [mysqld]
    10. port = 3306
    11. lower_case_table_names=2
    12. # Remove leading # and set to the amount of RAM for the most important data
    13. # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    14. # innodb_buffer_pool_size = 128M

    15. # Remove leading # to turn on a very important data integrity option: logging
    16. # changes to the binary log between backups.
    17. # log_bin

    18. # These are commonly set, remove the # and set as required.
    19. # 设置mysql的安装目录
    20. basedir=D:\mysql\mysql-8.0.14-winx64
    21. # 设置mysql数据库的数据的存放目录
    22. datadir=D:\mysql\mysql-8.0.14-winx64\data
    23. # 允许最大连接数
    24. max_connections=200
    25. # 服务端使用的字符集默认为8比特编码的latin1字符集
    26. character-set-server=utf8
    27. # 创建新表时将使用的默认存储引擎
    28. default-storage-engine=INNODB
    29. #慢查询
    30. slow_query_log = ON
    31. long_query_time = 1
    32. #开启binlog
    33. log-bin=mysql-bin

    34. # Remove leading # to set options mainly useful for reporting servers.
    35. # The server defaults are faster for transactions and fast SELECTs.
    36. # Adjust sizes as needed, experiment to find the optimal values.
    37. # join_buffer_size = 128M
    38. # sort_buffer_size = 2M
    39. # read_rnd_buffer_size = 2M

    40. sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'
    复制代码

    安装
    mysqld -install
    net start mysql
    mysql -uroot
    alter user "root"@"localhost" identified with mysql_native_password by 'root';

    远程访问:
    use mysql;
    update user set host = '%' where user ='root';
    之后重启mysql服务即可

    【出现问题】
    [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    【解决方案】
    mysql -uroot -p
    登录之后
    show variables like 'sql_mode';
    set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
    重启mysql后,再次验证是否为修改的值
    show variables like 'sql_mode';
    出现:STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION即是正确。

    资源帝国 - 论坛版权1、本主题所有言论和图片纯属会员个人意见,与本论坛立场无关
    2、本站所有主题由该帖子作者发表,该帖子作者与资源帝国享有帖子相关版权
    3、其他单位或个人使用、转载或引用本文时必须同时征得该帖子作者和资源帝国的同意
    4、帖子作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任
    5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
    6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
    7、资源帝国管理员和版主有权不事先通知发贴者而删除本文

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|手机版|小黑屋|资源帝国 ( 皖ICP备14009953号 )?

    GMT+8, 2019-8-11 01:51 , Processed in 0.231263 second(s), 25 queries .

    Powered by Discuz! X3.2

    ? 2001-2017 Comsenz Inc.

    快速回复 返回顶部 返回列表