從mysql.com下載下傳了一個最新的mysql.5.6.17後安裝後,因原機器安裝過mysql,啟動總是報錯
檢查了一下mysql的原安裝目錄裡面有個一新的myql-new.conf。
對比了下原/etc/my.conf和mysql-net.conf在mysql.5.6.17這個版本下有很大不同
原my.conf配置内容
[root@nginx01 bin]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
mysql_enable="YES"
mysql_args="--skip-grant-tables --skip-networking"
新配置的my.conf
[root@nginx01 mysql]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# 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 = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
# 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
其中這個網址
将安裝目錄下面的這個檔案覆寫後
重新開機mysql
[root@nginx01 bin]# ./mysqld_safe --user=mysql &
[1] 30069
[root@nginx01 bin]# 140518 11:21:42 mysqld_safe Logging to ‘/usr/local/mysql/data/nginx01.err‘.
140518 11:21:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[root@nginx01 bin]# netsat -atnp|grep 3306
-bash: netsat: command not found
[root@nginx01 bin]# netstat -antp|grep 3306
tcp 0 0 :::3306 :::* LISTEN 30173/mysqld
啟動成功
本文出自 “” 部落格,請務必保留此出處