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,1)"> 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,1)"> 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


port=3307
basedir="C:\Program Files\MySQL\MySQL Server 5.6\"
datadir="C:\Program Files\MySQL\MySQL Server 5.6\data\"
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,页面文件不足,实际使用的时候请按照实际情况配置。

相关文章

这篇文章主要介绍“hive和mysql的区别是什么”,在日常操作中...
这篇“MySQL数据库如何改名”文章的知识点大部分人都不太理解...
这篇文章主要介绍“mysql版本查询命令是什么”的相关知识,小...
本篇内容介绍了“mysql怎么修改字段的内容”的有关知识,在实...
这篇文章主要讲解了“mysql怎么删除unique约束”,文中的讲解...
今天小编给大家分享一下mysql怎么查询不为空的字段的相关知识...