win7 mysql安装过程问题

我的 mysql 发生系统错误1067 解决
版本 mysql5.6.37


用的解压配置版,环境变量和my.ini配置百度就行
注意要在环境变量path加你mysql_home(就是你mysql解压的目录)
path加:%mysql_home%/bin;
我的my.ini配置(就是拿my-default.ini改了下在windows和解压后的mysql目录下都放了这文件)


# 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 = H:\JAVA_Labrary\mysql-5.6.37-winx64
datadir = H:\JAVA_Labrary\mysql-5.6.37-winx64\data
port = 3306
# server_id = .....
default-storage-engine=MYISAM


# 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 


MySQL5.6 服务无法启系统出错。发生系统错误 1067。


在阿里云溪社区看到的解决方案


怎么在事件查看器查看系统日志百度就行
如下 在开始菜单搜索栏输入事件查看器--打开事件查看器--windows日志-应用程序-在右边栏有可以刷选日志选项(只需要mysql当天的错误日志)
在系统日志中查看到


事件类型: 错误
事件来源: MySQL
事件种类: 无
事件 ID: 100
日期:  2016-11-10
事件:  10:00:11
用户:  N/A
计算机: xxxxxx005D
描述:
Plugin 'InnoDB' registration as a STORAGE ENGINE failed.


For more information, see Help and Support Center at http://www.mysql.com. 


上面这句话的意思是这台服务器有加载过innodb,后来卸掉了,但是logfile文件没有删除,导致从新加载的时候出现这个问题。解决方法很简单


windows服务器


找到数据库安装目录下的data目录中然后删除如下文件(我把ib_logfile开头,ibdata开头,*.err,*.pid文件删除了。也就这几个文件我是除了文件夹,其它文件都删了,重新启动服务ok,启动成功后会生成这些文件)




mysql报错Plugin 'InnoDB' registration as a STORAGE ENGINE failed-engine innodb
linux服务器


rm -rf ib_logfile*


然后重新动态加载一次innodb即可,如果不行,那么重启一下mysql.


启动服务后登陆报
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)
解决办法:
打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”,保存并关闭文件。
第一次登陆要密码不填会提示输入密码
mysql -uroot -p
设置密码12345
登陆成功


查看编码
show variables like 'character_set%';
设置编码修改my.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.
basedir = H:\JAVA_Labrary\mysql-5.6.37-winx64
datadir = H:\JAVA_Labrary\mysql-5.6.37-winx64\data
port = 3306
# server_id = .....
default-storage-engine=MYISAM
character-set-server=utf8


# 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
skip-grant-tables


[mysql]
default-character-set=utf8


重新服务登陆查看编码都ok


创建数据库
CREATE DATABASE IF NOT EXISTS mydb DEFAULT CHARSET utf8 COLLATE utf8_general_ci;




第二天开机启动服务报错的问题:
InnoDB: Attempted to open a previously opened tablespace. Previous tablespace itcastoa/itcast_role uses space ID: 5 at filepath: .\itcastoa\itcast_role.ibd. Cannot open tablespace mysql/slave_worker_info which uses space ID: 5 at filepath: .\mysql\slave_worker_info.ibd
解决方法:data目录中删除ib_logfile开头,ibdata开头的文件重启服务OK



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值