MySQL 5.5 Installation

Source: Internet
Author: User

============== installation mysql======================

Yum Install Libaio-devel ncurses-y

===========================================

Mkdir/opt/tools-p

Cd/opt/tools

Groupadd MySQL

Useradd-s/sbin/nologin-m mysql-g MySQL

Tar XF mysql-5.5.32-linux2.6-x86_64.tar.gz

MV mysql-5.5.32-linux2.6-x86_64/opt/mysql-5.5.32

Ln-s/opt/mysql-5.5.32//opt/mysql

Chown-r mysql.mysql/opt/mysql/

Cd/opt/mysql

/opt/mysql/scripts/mysql_install_db--basedir=/opt/mysql/--datadir=/opt/mysql/data/--user=mysql

/bin/cp/opt/mysql/support-files/my-small.cnf/etc/my.cnf

Sed-i ' S#/usr/local/mysql#/opt/mysql#g '/opt/mysql/bin/mysqld_safe

/opt/mysql/bin/mysqld_safe &

echo "Path="/opt/mysql/bin: $PATH "" >>/etc/profile

Source/etc/profile

CP Support-files/mysql.server/etc/init.d/mysqld

Sed-i ' S#/usr/local/mysql#/opt/mysql#g '/etc/init.d/mysqld

chmod +x/etc/init.d/mysqld

Killall mysqld

/etc/init.d/mysqld start

Netstat-lntup |grep MySQL

Chkconfig--add mysqld

Chkconfig mysqld on

Chkconfig--list mysqld

echo "/etc/init.d/mysqld start" >>/etc/rc.local

Installation Complete

======================================================

#mysql

show databases;

Select User ();

Exit

# mysqladmin-u root password ' password '

# mysql-uroot-p

Select User,host from Mysql.user;

Set Root password complete


==========================================================

Grant all privileges on * * to user @ '% ' identified by ' password ';

#授权用户kaitaiming对所有库所有的权限

Flush privileges;


MySQL 5.5 Installation

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.