mysql安装教程5.5 win7_win7下mysql5.5与mysql5.6同时安装

在已安装MySQL5.5的前提下,通过官方解压版安装MySQL5.6。关键步骤包括修改my.ini配置文件,确保data-dir和base-dir使用正斜杠,并设置正确的路径。安装过程中可能遇到服务启动失败的问题,这通常与配置文件中的路径有关。解决方法是检查配置文件中的路径是否正确,特别是路径中的斜杠类型。安装完成后,使用mysqld --install命令创建服务,并确保服务名与已有MySQL服务区分,避免冲突。
摘要由CSDN通过智能技术生成

5.5己正常的情况下,用官 方下载的安装包总是不成功,用的官方解压版

1.复制my-default.ini到my.ini,其中代码如下:网上看到的代码总是不同,注意data-dir和base-dir的杠必须是斜杠。之前忘记了一直用反斜杠也不知道,事件查看器看不到什么,在bin下运行mysqld可以看到你服务无法启动的原因,后来才想起来是反斜杠的问题,改好了后就可以了,base-dir与data-dir如果没有设,就是一直卡在那,但下面只设了data-dir,也可以打开。

# 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.

#basedir = F:/software/database/mysql_5.6.24_winx64/mysql-5.6.24-winx64

datadir = F:/software/database/mysql_5.6.24_winx64/mysql-5.6.24-winx64/data

port = 3307

# server_id = .....

# 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

3.几条指令:

mysqld --install mysql56 #此处不要再叫mysql,会和5.5冲突

如果出错,删除原先的服务sc delete mysql56,然后再改ini再install,直至成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值