注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 QoS流量的分类和标记
 帮助

Ubuntu操作系统下安装MySQL数据库的方法


2008-02-22 16:22:34
安装版本mysql-5.0.40 需编译
  下载编译需要的一些工具,这些工具在默认安装的ubuntu上可能没有,需要手动安装
  sudo apt-get install g++ gcc make automake perl
  安装好所有需要的工具
  下载需要的libncurses5-dev、kdelibs_dev 和 kdelib
  sudo apt-get update
  apt-get install build-essential
  sudo apt-get install libncurses5-dev
  sudo apt-get install kdelibs4-dev
  sudo apt-get install kdelibs4c2a
  安装mysql,使用root权限
  shell> groupadd mysql
  shell> useradd -g mysql mysql
  shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
  shell> cd mysql-VERSION
  shell> ./configure ——prefix=/usr/local/mysql
  shell> make
  shell> make install
  shell> cp support-files/my-medium.cnf /etc/my.cnf
  shell> cd /usr/local/mysql
  shell> chown -R mysql .
  shell> chgrp -R mysql .
  shell> bin/mysql_install_db ——user=mysql
  shell> chown -R root .
  shell> chown -R mysql var
  shell> bin/mysqld_safe ——user=mysql &




    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: