How to install MySQL database in Ubuntu _ MySQL

Source: Internet
Author: User
Install the version mysql-5.0.40 requires compilation and download of some of the tools required for compilation, which may not be available on the default installed ubuntu, need to manually install sudoapt-getinstallg ++ gccmakeautomakeperl install all the required tools download the required libncurses5-dev, kd tumysql installation

  Install version mysql-5.0.40 to compile

Download and compile the required tools. these tools may not be available on the default ubuntu installation and need to be manually installed.

Sudo apt-get install g ++ gcc make automake perl

  Install all required tools

Download required libncurses5-dev, kdelibs_dev, and 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

  Install mysql with root permission

Shell> groupadd mysql

Shell> useradd-g mysql

Shell> gunzip | mysql-VERSION.tar.gz | tar-xvf-

Shell> cd mysql-VERSION

Shell>./configure -- prefix =/usr/local/mysql

Shell> make

Shell> make install

Shells> 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 &

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.