Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install MySQL5.1 under CentOS

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to install MySQL5.1 under CentOS". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

01

1. Bag

02

Wget http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.63.tar.gz

03

two。 Decompression

04

Tar zvxf. / mysql-5.1.63.tar.gz

05

3. Configure configure

06

. / configure-- prefix=/usr/local/mysql

07 www.2cto.com

-- with-charset=utf8

08

-- with-extra-charsets=all

09

-- with-tcp-port=3306

ten

-- with-unix-socket-path=/tmp/mysql.sock

eleven

-- with-mysqld-user=mysqld

twelve

-- with-federated-storage-engine

thirteen

-- with-mysqld-user=mysqld

fourteen

-- with-plugins=innobase,myisam

fifteen

-- enable-assembler

sixteen

-- without-isam

seventeen

-- with-client-ldflags=-all-static

eighteen

nineteen

{

twenty

Checking for termcap functions library... appears Configure: error: No curses/termcap library found

twenty-one

The curses/termcap library is not installed

twenty-two

Download wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

twenty-three

Decompress tar zxvf ncurses-5.9.tar.gz

twenty-four

Enter directory sudo. / configure-- prefix=/usr-- with-shared-- without-debug

twenty-five

Compile, install make, make install

26 www.2cto.com

}

twenty-seven

4. Compile, install

twenty-eight

Make

twenty-nine

Make install

thirty

5. Create users and groups. Configuration

thirty-one

Groupadd mysql

thirty-two

Useradd-g mysql mysql

thirty-three

Cp support-files/my-media.cnf / etc/my.cnf

thirty-four

Mkdir / usr/local/mysql/var

thirty-five

thirty-six

Modify the ownership of the MySQL data directory

thirty-seven

Chown-R mysql / usr/local/mysql / usr/lib/mysql / usr/share/mysql

thirty-eight

Chgrp-R mysql / usr/local/mysql / usr/lib/mysql / usr/share/mysql

thirty-nine

Www.2cto.com

forty

6. Install, start, enter.

forty-one

/ usr/local//bin/mysql_install_db

forty-two

/ user/local/mysql/bin/mysqld_safe

forty-three

/ user/local/mysql/bin/mysql-u root

forty-four

7. Add Startup item

forty-five

Mv / usr/local/mysqlshare/mysql/mysql.server / etc/init.d/mysql

forty-six

Chmod 775 / etc/init.d/mysql

forty-seven

Chkconfig-add mysql

This is the end of "how to install MySQL5.1 under CentOS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report