Install MySQL on RHEL 32bit

Source: Internet
Author: User

3 Ways to install MySQL


    1. # yum Install MySQL Mysql-server

    2. # RPM-IVH mysql-client-5.6.23-1.linux_glibc2.5.i386.rpm mysql-server-5.6.23-1.linux_glibc2.5.i386.rpm

    3. Install by binary file (couldneed to install CMake gcc gcc-c++ ncursesfirst):

      A. # tar xvf mysql-5.6.23.tar.gz-c/usr/src

      B. # cd/usr/src/mysql-5.6.23

      C. # CMake. -dcmake_install_prefix=/usr/local/mysql/-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-denabled_ Local_infile=on

      D. # make J2

      E. # make Install

Note:options of CMake refer to official docs


After installation, set up the configuration files (if with default configuration, jump to start MySQL and set up p Assword).

# VIM/ETC/MY.CNF

[Mysqld]
Datadir=/data
User=mysql
Socket=/data/mysqld.sock
Skip-name-resolve
port=3306
Log-bin=/data/mysqld-bin
Log-bin-index=/data/mysql-bin
Server-id=1

[Mysqld_safe]
Log-error=/data/mysqld.err
Pid-file=/data/mysqld.pid


Make directory and initiate

# Rm-rf/data
# Mkdir/data

# Cd/usr/local/mysql
#./scripts/mysql_install_db--datadir=/data--user=mysql


Start MySQL and set up password

# Mysqld_safe--DEFAULTS-FILE=/ETC/MY.CNF &
Or
# CP./support-files/mysql.server/etc/rc.d/init.d/sql
# chmod 755/etc/rc.d/init.d/sql
# Service SQL start


# mysqladmin-u root-s/data/mysqld.sock password ' 123 '
# mysqladmin-u root-h 127.0.0.1-p 3306 password ' 123 '
or
# ln-s/data/mysqld.sock/tmp/mysql.sock
# mysql_secure_installation
# Rm-rf/tmp/mysql.sock


Login MySQL

# mysql-u Root-s/data/mysqld.sock

Or

# mysql-u Root-h 127.0.0.1-p3306


Install MySQL on RHEL 32bit

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.