MYSQL-5.5 Binary Package Installation

Source: Internet
Author: User
Tags chmod

Groupadd MySQL Add user group

Useradd mysql-s/sbin/nologin-g mysql-m Add Users

MV mysql-5.5.54-linux2.6-x86_64.tar.gz/home/ye/software/download software to package

Cd/home/ye/software/

TAR-XF mysql-5.5.54-linux2.6-x86_64.tar.gz #解压mysql软件

CD mysql-5.5.54-linux2.6-x86_64

mv/home/ye/software/mysql-5.5.54-linux2.6-x86_64//application/mysql-5.5.54/Mobile Package to the installation path

cd/application/mysql-5.5.54/

Ln-s/application/mysql-5.5.54//application/mysql #创建软连接

Ls-l/application/mysql/support-files/*.cnf

CP/APPLICATION/MYSQL/SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF Configuration Profile

Mkdir-p/application/mysql/data Create data Directory

Chown-r mysql.mysql/application/mysql/#修改目录权限

/application/mysql/scripts/mysql_install_db--basedir=/application/mysql--Datadir=/application/mysql/data--user =mysql #初始化mysql

tree/application/mysql/data/#查看

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

chmod +x/etc/init.d/mysqld Add Permissions

Ll/etc/init.d/mysqld

Sed-i ' S#/usr/local/mysql#/application/mysql#g '/application/mysql/bin/mysqld_safe/etc/init.d/mysqld # To modify the default program execution path within a configuration file

/etc/init.d/mysqld start MySQL

/application/mysql/bin/mysqld_safe--user=mysql& #另一种方式启动MYSQL

Netstat-lntup to see if Port 3306 is started

Chkconfig--add mysqld Add service

Chkconfig mysqld on set MySQL service on default boot

Chkconfig--list mysqld View service status

Echo ' Export path=/application/mysql/bin: $PATH ' >>/etc/profile #更改mysql命令的全局环境变量; another way to put/application/mysql/ bin/The following command is copied to the path that is already a global system command/usr/local/sbin #

Source/etc/profile

Echo $PATH

MySQL Test login, default no password

mysqladmin-u root password ' ye123456 ' Set root password

Configure MySQL to be secure after the root password is set

Note: You need to add permissions to this directory if you are prompted for the can ' t crate file '/tmp/* ' Chmod-r 1777/tmp/

MYSQL-5.5 Binary Package Installation

Related Article

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.