bitsCN.com
最近一个项目需要用到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服务。
自己动手手动来把。
MayiCMS·蚂蚁分类信息系统是一款基于PHP+MYSQL(PC+手机+小程序+APP,跨平台、跨终端)的建站软件,拥有专业且完善的信息审核机制,信息刷新/置顶消费机制,信息分享/发布奖励机制,信息查看/付费授权机制,会员等级自助续费机制,为在各种类型操作系统服务器上架设信息发布平台提供完美的解决方案,拥有世界一流的用户体验,卓越的访问速度和负载能力。功能特点:1,PC手机自适应,URL路径完全
0
定位到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-beepport=3307[mysql]default-character-set=utf8[mysqld]port=3307basedir="C:/Program Files/MySQL/MySQL Server 5.6/"datadir="C:/Program Files/MySQL/MySQL Server 5.6/data/"character-set-server=utf8default-storage-engine=INNODBsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"log-error="NAS.err"max_connections=100query_cache_size=0query_cache_type=0table_open_cache=2000innodb_buffer_pool_size=10Minnodb_log_file_size=48Minnodb_concurrency_tickets=5000innodb_stats_on_metadata=0innodb_file_per_table=1flush_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,页面文件不足,实际使用的时候请按照实际情况配置。
bitsCN.com
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
C++高性能并发应用_C++如何开发性能关键应用
Java AI集成Deep Java Library_Java怎么集成AI模型部署
Golang后端API开发_Golang如何高效开发后端和API
Python异步并发改进_Python异步编程有哪些新改进
C++系统编程内存管理_C++系统编程怎么与Rust竞争内存安全
Java GraalVM原生镜像构建_Java怎么用GraalVM构建高效原生镜像
Python FastAPI异步API开发_Python怎么用FastAPI构建异步API
C++现代C++20/23/26特性_现代C++有哪些新标准特性如modules和coroutines
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号