Home > Database > Mysql Tutorial > Ubuntu操作系统下安装MySQL数据库的方法_MySQL

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

WBOY
Release: 2016-06-01 14:03:01
Original
1148 people have browsed it

Ubuntumysql安装

  安装版本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

  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 &

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template