晨风资讯网
新闻资讯网络冲浪网页设计网络编程图形图像数据库网络媒体服务器网络安全网站运营软件教程黑客认证Wap技术
教程搜索
教程搜索:
  首页 > 服 务 器 > Linux服务器 > 正文  

Fedora Core3 下 MySQL的安装(tallbar)
日期:2006-4-18 17:01:17 来源: 作者: 浏览:

 安装MySQL可以分为四步骤来进行。
第一步:下载MySQL.
   从mysql网站上直接下载MySQL的源代码,并解压缩它。
    目前mysql有好几个版本,我下载的是mysql-4.1.12.tar.gz档,并把它解压缩到了/usr/local/src里面。
    假设下载的档案存放在当前的目录里,执行下面的指令解压缩:
    #tar zxvf mysql-4.1.12.tar.gz -C /usr/local/src
    这时候你的/usr/local/src/里面会多一个mysql-4.1.12的文件夹。
第二步:安装MySQL.
    增加MySQL的系统账号:
    #groupadd mysql
    #useradd -g mysql mysql

    进入/usr/local/src/mysql-4.1.12目录里面。
    编译与安装MySQL
 
    cd /usr/local/src
tar -zxvf mysql-4.1.9.tar.gz
cd mysql-4.1.9
./configure \
--prefix=/usr/local/mysql \
--with-unix-sock-path=/tmp/mysql.sock \
--with-charset=utf8
make
make install
    如果安装成功,接下来就是把MySQL的配置文件复制到/etc下面,执行如下指令:
    #cp my-medium.cnf /etc/my.cnf




第三步:安装MySQL系统资 料库及设置安全属性

    进入到mysql的安装目录里。
    #cd /usr/local/mysql

    安装系统资料库
    bin/mysql_install_db --user=mysql
 
    设置目录的安全性
    chown -R root .
    chown -R mysql var
    chgrp -R mysql .
第四步:设置MySQL设定档
    # Example MySQL config file for medium systems.
    #
    # This is for a system with little memory (32M - 64M) where MySQL plays
    # an important part, or systems up to 128M where MySQL is used together with
    # other programs (such as a web server)
    #
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /usr/local/mysql/var) or
    # ~/.my.cnf to set user-specific options.
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.
   
    # The following options will be passed to all MySQL clients
    [client]
    #password       = your_password
    port            = 3306
    socket          = /tmp/mysql.sock
   
    # Here follows entries for some specific programs
   
    # The MySQL server
    [mysqld]
    port            = 3306
    socket          = /tmp/mysql.sock

本教程共4页,当前在第1页  1  2  3  4  


上一篇: Redhat Linux 学习笔记 (一) 下一篇:

中国黑客给黑客正名:黑客的本职是维护网络环境

返回列表 打印此页 加入收藏 资讯论坛 关闭窗口 点击复制本页地址,发送给QQ/MSN好友
关于我们 - 联系我们 - 版权声明 - 帮助(?) - 广告服务 - 友情链接 - 服务项目 - 人才招聘
2003-2008 版权所有 © 晨风资讯网 未经授权禁止复制或建立镜像
CopyRight 2003-2008 www.Net118.com,All Rights Reserved.Design By ChenFeng Network Studio