Install MySQL with a tar package in Ubuntu

Source: Internet
Author: User

Install MySQL server on Ubuntu, because it is not RedHat, so the RPM package on the MySQL official website can not be used, there are two packages available: mysql-5.1.49-linux-i686-icc-glibc23.tar.gz and mysql-5.1.49-linux-i686-glibc23.tar.gz, what is the difference between the two packages? I did not write it on the official website, nor did I find it. The installation process is mysql-5.1.49-linux-i686-icc-glibc23.tar.gz.

Some of the steps in the following installation method may be strange (Why ?), But please do not ask why, because I just want to install MySQL server, refer to some articles on the internet, you may have modified some settings can also be installed successfully, so do not have to do it, however, it is generally successful.

(1)extract mysql-5.1.49-linux-i686-icc-glibc23.tar.gz and the decompressed folder is named mysql-5.1.49-linux-i686-icc-glibc23;

(2) create a symbolic link under/usr/local/to the extracted directory, for example:

Ln-S/home/soft/mysql-5.1.49-linux-i686-icc-glibc23/usr/local/MySQL

In this case, a directory named "MySQL" is displayed under/usr/local.

(3) enter the Created directory:

CD/usr/local/MySQL/

This directory contains various files required to install MySQL server.

(4) note that there is a shell script "mysql_install_db" under the "scripts" directory. This script is used to install MySQL server, which is different from the general software installation process, you do not need configure or make install here. Run the script to install it.

When executing the script, you cannot enter the "scripts" directory, that is, you must be in the same directory as "scripts" and then execute:

./Scripts/mysql_install_db -- user = MySQL

(5) After executing the preceding command, you will usually receive several error messages:

[1] If you are prompted that you cannot resolve the localhost host name, you need to add a line in the/etc/hosts file:

127.0.0.1 localhost

At the same time, you also need to check whether there is a program named "resolveip" in the/usr/bin/directory. If not, an error will occur when executing the above MySQL installation script. The problem is, where can I find this program? Take a closer look at the "bin" directory decompressed by the installation package. Does this program already exist? Yes, it is already in it. So what we need to do now is to create a symbolic link under/usr/bin/to point to this program:

Ln-S/home/soft/mysql-5.1.49-linux-i686-icc-glibc23/bin/resolveip/usr/bin/resolveip

[2] If you are prompted that "MySQL" does not exist, you should add a user named "MySQL" to the system:

Adduser MySQL

Then follow the Wizard to perform step-by-step operations (setting the user's password is also completed in this process ).

(6) execute the installation script.

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.