系统:centos5.3mysql版本:mysql-5.1.38-linux-i686-icc-glibc23.tar.gz安装过程:#groupaddmysql#useradd-gmysqlmysql#tarzxvfmysql-5.1.38-linux-i686-icc-glibc23.tar.gz#ln-s/usr...
系统:centos5.3
mysql版本:mysql-5.1.38-linux-i686-icc-glibc23.tar.gz
安装过程:
# groupadd mysql
# useradd -g mysql mysql
# tar zxvf mysql-5.1.38-linux-i686-icc-glibc23.tar.gz
# ln -s /usr/local/mysql-5.1.38-linux-i686-icc-glibc23 mysql
# cd /usr/local/mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# vi /usr/local/mysql/support-files/my-medium.cnf
在后面加上
max_connections = 1500 /*为允许的最大连接数*/
log-slow-queries /*打开低速查询日志*/
long_query_time = 5 /*低速查询的秒数*/
# cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/data/my.cnf
# /usr/local/mysql/bin/mysqld_safe --user=mysql --basedir=/usr/local/mysql &
# echo '/usr/local/mysql/bin/mysqld_safe --user=mysql --basedir=/usr/local/mysql &' >> /etc/rc.local /*添加到启动文件*/
让系统找到mysql:
# PATH=$PATH:/usr/local/mysql/bin
# export PATH
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig
继续配置 mysql,使其在系统启动时自动启动:
# cp support-files/mysql.server /etc/init.d/mysqld
# chkconfig --add mysqld
# service mysqld restart
# ./bin/mysqladmin -u root password new-password
现在找不到log的路径,请高手们帮忙解决,小弟不胜感激!!
我这不是编译安装 /var/log/mysql/在我机上没有
展开