Install MySQL-source code (for testing in an experimental environment) _ MySQL

Source: Internet
Author: User
Install MySQL-source code (for testing in an experimental environment) bitsCN.com

Install MySQL-source code (for testing in an experimental environment)

[Plain]
# The virtual machine is the original system. we have installed scp in the virtual machine.
[Root @ serv01 ~] # Yum install/usr/bin/scp-y
# Installation process
# Copy the MySQL source code package to the/root directory of the target machine.
[Root @ larrywen ule-sa1] # ls mysql-5.1.59.tar.gz
Mysql-5.1.59.tar.gz
[Root @ larrywen ule-sa1] # pwd
/Opt/soft/ule-sa1
[Root @ larrywen ule-sa1] # scp mysql-5.1.59.tar.gz 192.168.1.11:/root
[Root@192.168.1.11's password:
Mysql-5.1.59.tar.gz 100% 23 MB 23.2 MB/s

Decompress mysql-5.1.59.tar.gz to the/usr/src/directory and enter the directory.
[Root @ serv01 ~] # Tar-xf mysql-5.1.59.tar.gz-C/usr/src/
[Root @ serv01 ~] # Cd/usr/src
[Root @ serv01 src] # ls
Debug kernels mysql-5.1.59
[Root @ serv01 src] # cd mysql-5.1.59/
# View The Help documentation. you can see the complete MySQL installation documentation in line 4718.
[Root @ serv01 mysql-5.1.59] # vim INSTALL-SOURCE line 4728
# Install MySQL under/usr/local/mysql
[Root @ serv01 mysql-5.1.59] #./configure -- prefix =/usr/local/mysql
[Root @ serv01 mysql-5.1.59] #./configure -- help
Checking build system type... x86_64-unknown-linux-gnu
Checking host system type... x86_64-unknown-linux-gnu
Checking target system type... x86_64-unknown-linux-gnu
Checking for a BSD-compatible install.../usr/bin/install-c
Checking whether build environment is sane... yes
Checking for a thread-safe mkdir-p.../bin/mkdir-p
Checking for gawk... gawk
Checking whether make sets $ (MAKE)... no
Checking how to create a ustar tar archive... gnutar
Checking for style of include used by make... none
Checking for gcc... no
Checking for cc... no
Checking for cl.exe... no
Configure: error: in '/usr/src/mysql-5.1.59 ':
Configure: error: no acceptable C compiler found in $ PATH
See 'config. log' for more details.
# As you can see, an error is reported. The appropriate C compiler cannot be found in the environment variable. because MySQL is written in C language, the C language compiler is required.
# Install tools
[Root @ serv01 mysql-5.1.59] # yum grouplist | grep Devel
Additional Development
Desktop Platform Development
Development tools
Server Platform Development
[Root @ serv01 mysql-5.1.59] # yum groupinstall "Development tools"-y
# Installation process
# If you check the environment again, the following error will be reported: No curses/termcap library
# Found, we need to install ncurses-devel
[Root @ serv01 mysql-5.1.59] #./configure -- prefix =/usr/local/mysql
Checking for termcap functions library... configure: error: No curses/termcap library found
[Root @ serv01 mysql-5.1.59] # yum install ncurses-devel-y
# Installation process
# Check the environment again. if "Thank you for choosing" appears
# MySQL! ", It indicates there is a 99.99% possibility to install MySQL
[Root @ serv01 mysql-5.1.59] #./configure -- prefix =/usr/local/mysql
......
Thank you for choosing MySQL!

Remember to check the platform specific part of the reference manual
For hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.
# Execute make to compile
[Root @ larrywen mysql-5.1.59] # make
# Compilation process
# Execute make install to install
[Root @ larrywen mysql-5.1.59] # make install
# Installation error

# Subsequent service configuration
[Root @ serv01 mysql] #/usr/local/mysql/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)
# Uninstall
[Root @ serv01 local] # rm-rf mysql/

BitsCN.com

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.