现象:mysql数据库不启动,启动提示出错,重新安装也是出错,在启动的时候报错,提示1067错误。
我用的方法:将原来好多可用的mysql安装目录下的my.ini文件拷贝到新的安装的下面,然后重新安装一遍,能够启动了,但登录phpmyadmin还是不行,于是再次卸载一遍再安装一遍,这个时候初始化mysql的时候提示输入密码什么的了,再次进入phpmyadmin,一切正常。
需要说明一下,我用的是PHPNow。
最后附上我的my.ini:
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M – 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:mysqldata) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the “–help” option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 64M
max_connections = 1000
default-character-set = utf8
thread_cache_size = 8
# Don’t listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the “enable-named-pipe” option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# binary logging format – mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 – 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=
# MASTER_USER=
#
# where you replace
#
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST=’125.564.12.1′, MASTER_PORT= 3306,
# MASTER_USER=’joe’, MASTER_PASSWORD=’secret’;
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables’ values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 – 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave – required
#master-host =
#
# The username the slave will use for authentication when connecting
# to the master – required
#master-user =
#
# The password the slave will authenticate with when connecting to
# the master – required
#master-password =
#
# The port the master is listening on.
# optional – defaults to 3306
#master-port =
#
# binary logging – not required for slaves, but recommended
#log-bin=mysql-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:mysqldata/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:mysqldata/
# You can set .._buffer_pool_size up to 50 – 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
摘录网上一文如下:
作者fbysss
msn:jameslastchina@hotmail.com
blog:blog.csdn.net/fbysss
声明:本文由fbysss整理编写,转载请注明出处
关键字:MySQL,1067错误
我的机器不知为何,安装MySQL的时候,一到配置那一步就无休止的等待,只好结束任务,然而启动MySQL的时候出现1067错误提示。卸载,依然出现无休止等待,解决办法是先结束任务,然后点击‘更改’,repair,然后再进行卸载。
后来看了一篇文章,说是system用户权限没加上的问题,我的安装目录D:MySQL5.0,一看D盘的确只有everyone,而c盘有 system的读写许可。于是就安装了一次放在c:programe files里面,还真好使了。本来就准备下结论了,为了确认,卸载后又装了一遍放到c:下,然而不行。卸载后再装c:programe files也不行了。怎么弄都会在Configure那一步死掉。怎么办?
还好记得成功的那一次多生成了一个my.ini在MySQL的目录,于是在同事机器上拷贝了一个my.ini拿来修改,并单独放在一个地方作为备份。其内容如下:
#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions
[mysqld]
basedir=d:/MySQL5.0/
#bind-address=127.0.0.1
datadir=d:/MySQL5.0/data
#language=D:/usr/local/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=d:/MySQL5.0/bin/mysqld-nt.exe
user=root
password=
然后在bin目录下
mysqld-nt -remove
mysqld-nt -install
net start mysql
ok!
看来最关键的问题,还在于这个my.ini
这么一个小问题,居然花了我一个上午的时间!搞定问题的第一件事情就是把过程写下来,供受害者参考。
Copyright@ 2011-2016 版权所有:大连千亿科技有限公司 辽ICP备11013762-3号 google网站地图 百度网站地图 网站地图
公司地址:大连市沙河口区中山路692号辰熙星海国际2317 客服电话:0411-39943997 QQ:2088827823 37482752
法律声明:未经许可,任何模仿本站模板、转载本站内容等行为者,本站保留追究其法律责任的权利! 隐私权政策声明