zoukankan      html  css  js  c++  java
  • MySQL在x64系统上1067问题解决

    最近一个项目需要用到MYSQL,因为以前也弄过,所以就没怎么多想,直接下一个完事了。于是乎果断上官方网站下了一个installer(5.26),修改了一下默认位置和配置,然后一路next,最后在配置完成启动的时候,mysql installer一直停在attempting to start service。

    想着是不是系统崩溃了(aliyun服务器,1G内存,server 2008R2,不是很流畅),重启。

    然后cmd》net start mysql56

    弹出错误1067

    于是噩梦开始了……

    首先觉得是不是没有安装成功,重新来一次吧。于是卸载,再次安装,问题依旧。每次安装完成也不弹出配置的选项,我琢磨是不是有问题,翻了一下安装log。

    System Error :"Error 1918.Error installing ODBC driver Mysql ODBC 5.2 ANSI Driver

    原来是这个问题…

    查阅资料(http://www.cnblogs.com/rangeon/p/3410459.html),重新复制一个新名称就可以了。mysql installer安装的就是x86版本的。

    终于odbc算是过了。

    然后我想着没啥问题了,于是重新安装,依旧不能弹出配置界面,重试多次无果,services.msc中也找不到mysql56服务。

    自己动手手动来把。

    定位到mysql安装目录的bin文件夹

    执行mysqld --install MySQL56 --defaults-file="{安装目录}mydefault.ini"

    service安装成功。

    net start mysql56,接着1067。

    查看mydefault.ini

    # For advice on how to change settings please see
    # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
    # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
    # *** default location during install, and will be replaced if you
    # *** upgrade to a newer version of MySQL.
    
    [mysqld]
    
    # Remove leading # and set to the amount of RAM for the most important data
    # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    # innodb_buffer_pool_size = 128M
    
    # Remove leading # to turn on a very important data integrity option: logging
    # changes to the binary log between backups.
    # log_bin
    
    # These are commonly set, remove the # and set as required.
    # server_id = .....
    # basedir=
    # datadir=
    # port =
    
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M 
    
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

    basedir、datadir、port都没写,填上相应路径。

    依旧不行。从网上找了一份my.ini配置成功,贴在下面给大家参考。

    [client]
    no-beep
    port=3307
    
    [mysql]
    default-character-set=utf8
    
    [mysqld]
    port=3307
    basedir="C:Program FilesMySQLMySQL Server 5.6"
    datadir="C:Program FilesMySQLMySQL Server 5.6data"
    character-set-server=utf8
    default-storage-engine=INNODB
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    log-error="NAS.err"
    max_connections=100
    query_cache_size=0
    query_cache_type=0
    table_open_cache=2000
    innodb_buffer_pool_size=10M
    innodb_log_file_size=48M
    innodb_concurrency_tickets=5000
    innodb_stats_on_metadata=0
    innodb_file_per_table=1
    flush_time=0

    注意:默认mysql端口3306,因为我的系统该端口已经被占用,因此改成3307。log-error="nas.err"是日志文件,会在data下生成,如果有错误查看这个就知道了,在配置文件不正确的时候经常出现

    InnoDB: Assertion failure in thread xxxx in file ut0mem.cc line 105

    InnoDB: Failing assertion: ret || !assert_on_error

    还有就是请自己配置innodb_buffer_pool_size,原文配置的是256M,因为内存小,直接弹出系统错误1455,页面文件不足,实际使用的时候请按照实际情况配置。

  • 相关阅读:
    关于类型转换构造函数的疑惑点
    类模板与静态 成员变量
    模板与友元
    类模板与派生
    类模板
    函数模板
    泛型程序设计基本概念
    3、成员函数
    条款 06:若不想使用编译器自动生成的函数,就该明确拒绝
    PHP操作redis
  • 原文地址:https://www.cnblogs.com/podolski/p/3625322.html
Copyright © 2011-2022 走看看