欢迎来到天天文库
浏览记录
ID:1771774
大小:33.08 KB
页数:13页
时间:2017-11-13
《centos5.5_mysql_5.1.49的安装、优化及安全设置》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CentOS5.5MySql5.1.49的安装、优化及安全设置下载页面:http://dev.mysql.com/downloads/mysql/5.0.html#downloads到页面底部,找到Sourcedownloads,这个是源码版本,下载第1个Tarballwgethttp://mysql.ntu.edu.tw/Downloads/MySQL-5.1/mysql-5.1.49.tar.gzMysql5.1.49版本真是速度滴就出来了。wgethttp://mysql.ntu.edu.t
2、w/Downloads/MySQL-5.1/MySQL-server-community-5.1.49-1.rhel5.i386.rpmwgethttp://mysql.ntu.edu.tw/Downloads/MySQL-5.1/MySQL-client-community-5.1.49-1.rhel5.i386.rpm今天花了近一天的时间来安装mysql,终于在最后成功了。真是太折腾人了。至于为什么选用sourcecode来安装而不选用rpm,主要是在网上查到rpm不能指定安装目录,这是我不喜
3、欢的。首先下载mysql-5.1.49.tar.gz-yumremovemysql//删除CentOS上自带的老版本mysql-groupaddmysql-useradd-gmysqlmysql在编辑MYSQL时:#./configure--prefix=/usr/local/mysql--with-charset=gb2312 --with-extra-charsets=all 执行后出现如下错误:checkingfortgetentin-ltermcap…nocheckingfortermca
4、pfunctionslibrary…configure:error:Nocurses/termcaplibraryfound 解决方法:编译时加上路径即可解决,即#./configure--prefix=/usr/local/mysql--with-charset=gb2312 --with-extra-charsets=all --with-named-curses-libs=/usr/lib/libncurses.so.5如果是Ubuntu,需要安装.sudoapt-getinstalllib
5、ncurses5-dev如果Ubuntu上安装了VMwareTools-版本号.tar.gz则不需要安装libncurses5-dev,在编译时加上--with-named-curses-libs=/usr/lib/libncurses.so.5/bin/rm:cannotremove`libtoolT':Nosuchfileordirectory错误在执行./configure之前,先执行:#autoreconf--force--install#libtoolize--automake--for
6、ce#automake--force--add-missing编译配置参数./configure–help查看选项./configure–prefix=/mysql–localstatedir=/data–sysconfdir=/mysql–with-unix-socket-path=/mysql/mysql.sock–with-charset=utf8–with-collation=utf8_general_ci–with-extra-charsets=gbk,latin1–wi
7、th-plugins=partition,blackhole,heap,innobase,myisam,ndbcluster,csv,federated–without-debug–enable-thread-safe-client–enable-assembler–enable-profiling–with-mysqld-ldflags=-all-static–with-client-ldflags=-all-static–with-mysqld-user=mysql–witho
8、ut-embedded-server–with-server-suffix=-community–with-tcp-port=3306执行需要10分钟左右说明:–prefix=/mysql #安装目录–localstatedir=/data #数据目录–sysconfdir=/mysql #my.cnf目录–with-unix-socket-path=/mysql/mysql.sock #socket文件目录–with-charset=utf8 #默认字符集–with
此文档下载收益归作者所有