首页 > 代码库 > mysql 5.5.28与mysql5.6.17 配置启动区别

mysql 5.5.28与mysql5.6.17 配置启动区别

从mysql.com下载了一个最新的mysql.5.6.17后安装后,因原机器安装过mysql,启动总是报错

wKioL1N4Rx7QBz_AAAAykPCF0ck190.png

检查了一下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


[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 = .....

# 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


其中这个网址http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html是mysql.5.6.17最新的配置

将安装目录下面的这个文件覆盖后

重启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  

启动成功

本文出自 “linux-php-user” 博客,请务必保留此出处http://wangsheng219.blog.51cto.com/2147741/1413102