欢迎来到天天文库
浏览记录
ID:8789463
大小:15.99 KB
页数:3页
时间:2018-04-07
《centos6.0编译安装mysql5.5.17》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、CentOS6.0编译安装MySQL5.5.171.安装相关库文件 yuminstallbison gcc gcc-c++autoconf automake zlib*libxml* ncurses-devellibtool-ltdl-devel* 2.安装cmake wget http://www.cmake.org/files/v2.8/cmake-2.8.6.tar.gztarzxvfcmake-2.8.6.tar.gzcdcmake-2.8.6/./configuregmakegmakeinstall 3.设置用户/usr/sbin/groupaddmysql (如
2、果有提示已存在,并不是错误)/usr/sbin/useradd-gmysqlmysql (如果有提示已存在,并不是错误)mkdir-p/data/mysqlchown-Rmysql:mysql/data/mysql 4.MYSQL5.5.17wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.17.tar.gz/from/http://mysql.ntu.edu.tw/ 在解压的mysql-5.5.17目录中移除目录中的CMakeCache.txttarzxvfmysql-5.5.17.tar.gzcdmysql-5.5
3、.17cmake.-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/data/mysql-DSYSCONFDIR=/etc/makemakeinstall 5.设置cd/usr/local/mysqlcp./support-files/my-huge.cnf/etc/my.cnf 编辑/etc/my.cnfvi/etc/my.cnf在[mysqld]段增加datadir=/data/mysqlwait-timeout=30max_connections=512max_connect_errors=10000000default-s
4、torage-engine=MyISAM在[mysqld]段修改max_allowed_packet=16M ./scripts/mysql_install_db--user=mysqlcp./support-files/mysql.server/etc/rc.d/init.d/mysqldchmod755/etc/rc.d/init.d/mysqldchkconfig--addmysqldchkconfig--level3mysqldon 编译/etc/rc.d/init.d/mysqldvi /etc/rc.d/init.d/mysqld把basedir=编辑成basedir=/usr
5、/local/mysql把datadir=编辑成datadir=/data/mysql /usr/local/mysql/bin/mysqld_safe &[1] 4960[root@hello mysql-5.0.56]# Starting mysqld daemon with databases from /usr/local/mysql/data[root@hello mysql-5.0.56]# netstat -lntp
6、grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:*
7、 LISTEN 4983/mysqld bin/mysqladmin-urootpassword'password_for_root'其中引号内的password_for_root是要设置的root密码servicemysqldrestart进入Mysql bin/mysql-uroot-p
此文档下载收益归作者所有