Simple Solution for installing MySQL database under Ubuntu

Source: Internet
Author: User

Today we are going to discuss with you how to correctly install the MySQL database in the Ubuntu operating system, two days ago, I was excited to learn about how to install the MySQL database correctly on the Ubuntu operating system on my website. I will share it with you today.

Install MySQL (the best combination with PHP)-5.0.40 requires compilation

Download and compile the required tools. These tools may not be available 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 for the MySQL database

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  
  6.  

Install MySQL (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)

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 (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 (the best combination with PHP )&

The above content introduces how to install MySQL database in the Ubuntu operating system.

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.