How to install MySQL source code in CentOS5

Source: Internet
Author: User
1. Install the uname-aLinuxha012.6.18-194.el5 #1SMPFriApr214 in the compiling environment: 58: 35edt2010i686i686i686i1_gnulinuxyum-yinst

1. Install uname-aLinux ha01 2.6.18-194. el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linuxyum-y inst in the compilation environment

Homepage → Database Technology

Background:

Read News

How to install MySQL source code in CentOS5

[Date:] Source: Linux community Author: puwenhui [Font:]

1. Install the compiling environment

Uname-

Linux ha01 2.6.18-194. el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux

Yum-y install gcc

Yum install-y gcc-c ++

2. mysql compilation and Installation

[Root @ ha01 local] # tar-xvf mysql-5.1.54.tar.gz

[Root @ ha01 local] # groupadd mysql
[Root @ ha01 local] # useradd-g mysql
[Root @ ha01 local] #./configure -- prefix =/usr/local/mysql -- with-named-curses-libs =/usr/lib/libncursesw. so.5

[Root @ ha0local] # cd mysql-5.1.54

[Root @ ha01 mysql-5.1.54] # make

[Root @ ha01 mysql-5.1.54] # make install
[Root @ ha01 mysql-5.1.54] # cp support-files/my-medium.cnf/etc/my. cnf


[Root @ ha01 mysql-5.1.54] # cp support-files/mysql. server/etc/init. d/mysql

[Root @ ha01 mysql-5.1.54] # chmod + x/etc/init. d/mysql

[Root @ ha01 mysql-5.1.54] # chkconfig -- add mysql

[Root @ ha01 mysql-5.1.54] # cd/usr/local/mysql

[Root @ ha01 mysql] # bin/mysql_install_db -- user = mysql

[Root @ ha01 mysql] # chown-R root.

[Root @ ha01 mysql] # chown-R mysql var
[Root @ ha01 mysql] # chgrp-R mysql.


[Root @ ha01 mysql] # bin/mysqld_safe -- user/mysql &

[Root @ ha01 mysql] #./bin/mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.1.54-log Source distribution

Copyright (c) 2000,201 0, Oracle and/or its affiliates. All rights reserved.
This software comes with absolutely no warranty. This is free software,
And you are welcome to modify and redistribute it under the GPL v2 license

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Test |
+ -------------------- +
3 rows in set (0.01 sec)

3. Start and Stop the service

[Root @ ha01 mysql-5.1.54] #/etc/init. d/mysql stop
Shutting down MySQL. [OK]
[Root @ ha01 mysql-5.1.54] #/etc/init. d/mysql start
Starting MySQL. [OK]

  • 0
  • Oracle Database DBA daily SQL list

    How to Use the SYS_CONNECT_BY_PATH function in Oracle

    CentOS

    Image Information

    View All comments in this article (0)

    Comments

    Latest Information

    Popular this week

    Introduction to Linux community-advertisement service-website map-help Info-contact us
    The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.


    Copyright©2006-2011 Linux community All rights reserved Zhejiang ICP backup No. 06018118

    ,

    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.