免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1267 | 回复: 0
打印 上一主题 下一主题

linux下安装mysql5.0.18(源码包) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-22 17:41 |只看该作者 |倒序浏览
linux下安装mysql5.0.18(源码包)
                                               
                                               
                                                                                                                                                                                                                        #作者:yzcdf
源码包可以在这个网址获得:
http://download.mysql.cn/src/2006/0208/62.html
首先说一下编码,安装mysql的时候,默认使用latin1编码,如果要改变默认编码,用选项--with-charst
例如:
     shell> ./configure --with-charset=CHARSET
     CHARSET 可以使下面编码中的一种: `big5', `cp1251', `cp1257', `czech',
     `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1',
     `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1',
     `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or
     `win1251ukr'.  See *Note character-sets::.

所有这些操作需要root权限
安装开始:
     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> gunzip  cd mysql-VERSION
     shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
     shell> make
     shell> make install
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> cd /usr/local/mysql
     shell> bin/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql var
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &
     (用mysql用户启动很重要。)
     shell> bin/mysql -uroot -p
     (输入密码,默认密码为空,直接回车即可)
     shell> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
     如果出现上面的提示,说明mysql服务没有正常启动,因为mysql服务启动的话,会自动生成mysql.sock文件
     shell> killall mysql
     杀掉所有mysql进程,重新启动
     shell> bin/mysql_install_db --user=mysql
     重新启动
     shell> bin/mysql -uroot -p
                                                       
                                                                                                                        搜索更多相关主题的帖子:
                                                                                                                               
源码

linux
                                                               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14014/showart_699446.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP