summed up the online MySQL 5.6.26 problems with the Myssql database installed with the tar.gz package

Source: Internet
Author: User

summed up the online MySQL 5.6.26 problems with the Myssql database installed with the tar.gz package

Installation package:
Linux Generic
Mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz
Installation Environment:
CentOS 7

The database is supposed to be no more difficult, but it's still tangled for two days. Chinese garbled problem, database service restart report missing. pid file problem. The process is here to make a small summary, so that later in the work of the need for easy access.
1. Create MySQL group and MySQL user;
[[email protected] ~]# Groupadd MySQL
[[email protected] ~]# useradd-g MySQL MySQL

2. Extract the acquired tar.gz package to the/usr/local/directory;
[Email protected] ~]# tar-zxvf/data/mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz
[Email protected] ~]# cp/data/mysql-5.6.26-linux-glibc2.5-x86_64//usr/local/

3, renamed, Convenient for future use;
[Email protected] local]# MV mysql-5.6.26-linux-glibc2.5-x86_64/mysql/

4, modify the MySQL directory permissions;
[Email protected] local]# chown-r mysql:mysqlmysql

5, installation;
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data

6, modify the database default encoding;
[Email protected] mysql]# VI my.cnf
Add after [mysqld]
Character_set_server=utf8
Save exit
[Email protected] mysql]# CD support-files/
[Email protected] support-files]# VI my-default.cnf
Also added after [mysqld]
Character_set_server=utf8
Save exit

7. Configure various system parameters
[email protected] support-files]# CP my-default.cnf/etc/my.cnf
[email protected] support-files]# CP Mysql.server/etc/rc.d/init.d/mysql
[Email protected] support-files]# Vi/etc/profile Add the following content
Export mysql_home= "/usr/local/mysql"
export path= "$PATH: $MYSQL _home/bin"Save exit [email protected] support-files]# Source/etc/profile
8. Add self-starting service [email protected] support-files]#Chkconfig--add MySQL [email protected] support-files]#Chkconfig MySQL on 9, start MySQL [email protected] support-files]#Service MySQL start 10, login MySQL and change password and configure remote access [email protected] support-files]#mysqladmin-u root password ' your_password '#修改root用户密码 [email protected] support-files]#Mysql-u Root -P #登录mysql, you need to enter a password Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' Your_password ' with GRANT OPTION;#允许root用户远程访问 mysql>flushprivileges; #刷新权限Mysql>exit

summed up the online MySQL 5.6.26 problems with the Myssql database installed with the tar.gz package

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.