How to install MySQL database to Ubuntu

Source: Internet
Author: User

The following article describes how to correctly install the MySQL database under the Ubuntu operating system. We are the best combination of MySQL and PHP) -for installation in version 5.0.40, You need to compile and download the required tools.

These tools may not exist on the default ubuntu installation and need to be manually installed.

 
 
  1. sudo apt-get install g++ gcc make automake perl 

Install all required tools

Download required libncurses5-dev, kdelibs_dev, and kdelib

 
 
  1. sudo apt-get update  
  2. apt-get install build-essential  
  3. sudo apt-get install libncurses5-dev  
  4. sudo apt-get install kdelibs4-dev  
  5. sudo apt-get install kdelibs4c2a  

Install the MySQL database (the best combination with PHP) and use the root permission

Shell> groupadd MySQL (the best combination with PHP)

Shell> useradd-g MySQL (the best combination with PHP) MySQL database (the best combination with PHP)

Shell> gunzip <mysql()and php )))-version.tar.gz | tar-xvf-

Shell> cd MySQL (best combination with PHP)-VERSION

Shell>./configure -- prefix =/usr/local/MySQL (the best combination with PHP)

Shell> make

Shell> make install

Shells> cp support-files/my-medium.cnf/etc/my. cnf

Shell> cd/usr/local/MySQL database (best combination with PHP)

Shell> chown-R MySQL (the best combination with PHP ).

Shell> chgrp-R MySQL (the best combination with PHP ).

Shell> bin/MySQL (the best combination with PHP) _ install_db -- user = MySQL (the best combination with PHP)

Shell> chown-R root.

Shell> chown-R MySQL (the best combination with PHP) var

Shell> bin/MySQL (the best combination with PHP) d_safe -- user = MySQL database (the best combination with PHP )&

Related Article

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.