免费注册 查看新帖 |

Chinaunix

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

编译安装Mysql5.0 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-30 15:53 |只看该作者 |倒序浏览
一 准备
软件准备:mysql-5.0.45.tar.gz
安装环境:Centos4.5
二 解压
#tar zxvf mysql-5.0.45.tar.gz
#mv mysql-5.0.45 /usr/local/src/
#cd /usr/local/src/mysql-5.0.45
三 编译安装
#./configure --prefix=/usr/local/mysql
#make && make install
四 配置
#cp support-files/my-large.cnf /etc/my.cnf
#mkdir /usr/local/mysql/var
#useradd -d /usr/local/mysql/var mysql
#su - mysql
$/usr/local/mysql/bin/mysql_install_db &
成功后系统返回信息如下:
               
               
                Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h centos.cn password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[1]+  Done                    /usr/local/mysql/bin/mysql_install_db
五 设置可执行路径
#vi /etc/profile
    pathmunge /usr/bin 下添加
    pathmunge /usr/local/mysql/bin
六 启动
#bin/mysql_safe --user=mysql &
七 测试
#mysql -u root
mysql> \s         //查看系统信息
八 给root帐号添加密码:
#/usr/local/mysql/bin/mysqladmin -u root password '密码'
注:红色标识部分的第一个反斜杠是托意符


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP