当前位置:首页 > 网络编程 > 数据库 > Mysql > Ubuntu操作系统下安装MySQL数据库的方法

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

点击次数:33 次 发布日期:2008-11-22 09:03:23 作者:源代码网
源代码网推荐

源代码网整理以下      安装版本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 &

源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华