現象: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
法律聲明:未經許可,任何模仿本站模板、轉載本站內容等行為者,本站保留追究其法律責任的權利! 隱私權政策聲明