CentOS7 minimum mysql Installation

Source: Internet
Author: User

CentOS7 minimum mysql Installation
1. Install CentOS-7-x86_64-DVD-1511.iso.
The minimum installation method. We recommend that you add development tools, samba, and file sharing.
Select a static IP address during installation and enter the machine name.


2. Install the network toolkit
Yum install net-tools


If the installation is in the dynamic IP address mode, you need to manually change the IP address to static and change the Host Name


3. Install vmtools
Mount-t auto/dev/cdrom/mnt/cdrom
Cp, mnt, cdrom, VMwareTools-10.0.10-4301679.tar.gz, root
Tar zxvf VMwareTools-10.0.10-4301679.tar.gz
Cd vmware-tools-distrib
/Vmware-install.pl
Rm-rf vmware-tools-distrib


4. Update or upgrade CentOS to minimize Installation
Yum update & yum upgrade


5. Add 163 Image Source
# Mv/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.backup
Cp/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.backup
Cd/etc/yum. repos. d/
Wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
Yum clean all
Yum makecache


5. Install mysql
Sudo rpm-Uvh mysql57-community-release-el7-9.noarch.rpm
Sudo yum install mysql-community-server
Vi/etc/my. cnf


# Add the following content
Log_bin_trust_function_creators = 1
Character-set-server = utf8
Lower_case_table_names = 1


Plugin-load = validate_password.so
Validate-password = FORCE_PLUS_PERMANENT
SQL _mode = 'only _ FULL_GROUP_BY, hour, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, hour, NO_AUTO_CREATE_USER, hour, PIPES_AS_CONCAT, ANSI_QUOTES'


Max_connections = 4000
Key_buffer_size = 200 M
Low_priority_updates = 1
Table_open_cache = 8000
Back_log = 1500
Query_cache_type = 0
Table_open_cache_instances = 16


# Files
Innodb_file_per_table
Innodb_log_file_size = 200 M
Innodb_log_files_in_group = 3
Innodb_open_files = 4000


# Buffers
Innodb_buffer_pool_size = 1024 M
Innodb_buffer_pool_instances = 32
# Innodb_additional_mem_pool_size = 20 M
Innodb_log_buffer_size = 64 M
Join_buffer_size = 32 K
Sort_buffer_size = 32 K


# Innodb
Innodb_checksums = 0
Innodb_doublewrite = 0
Innodb_support_xa = 0
Innodb_thread_concurrency = 0
Innodb_flush_log_at_trx_commit = 2
Innodb_max_dirty_pages_pct = 50
Innodb_use_native_aio = 1
Innodb_stats_persistent = 1
Innodb_spin_wait_delay = 16 #6/96


# Perfspecial
Innodb_adaptive_flushing = 1
Innodb_flush_neighbors = 0
Innodb_read_io_threads = 4
Innodb_write_io_threads = 4
Innodb_io_capacity = 400
Innodb_purge_threads = 1
Innodb_adaptive_hash_index = 0


# Monitoring
Innodb_monitor_enable = '%'
Performance_schema = OFF


Sudo service mysqld start
Sudo grep 'temporary password'/var/log/mysqld. log
Mysql-uroot-p
Alter user 'root' @ 'localhost' identified by 'mynewpass4! ';
Use mysql
Update user set host = '%' where user = 'root ';
Flush privileges;
Exit
Iptables-a input-p tcp-m state -- state NEW-m tcp -- dport 3306-j ACCEPT
Iptables-a input-p tcp-m state -- state NEW-m tcp -- dport 1521-j ACCEPT
Iptables-a input-p tcp-m state -- state NEW-m tcp -- dport 1234-j ACCEPT
Service iptables restart
Service iptables stop
Service firewalld stop
# Systemctl disable firewalld. service
# Systemctl disable iptables. service

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.