In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Http://www.cnblogs.com/zhao1949/p/5947938.html
The installation tutorial of Mysql 5.7.13 in linux environment is shared for your reference. The details are as follows
1 system convention
Download directory of installation files: / data/software
Mysql directory installation location: / usr/local/mysql
Database location: / data/mysql
Log location: / data/log/mysql
2 download mysql
On the official website: http://dev.mysql.com/downloads/mysql/, select the following version of mysql to download:
Perform the following naming:
# mkdir / data/software
# cd / data/software
# wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
3 decompress the package to the target location
# mkdir / usr/local/mysql
# cd / dat/software
# pwd
After implementation, it is as follows:
# ls
# cd / usr/local
# pwd
# tar-xzvf / data/software/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
# ls
-- modify the file name
# mv mysql-5.7.13-linux-glibc2.5-x86_64 mysql
# ls
4 create a data warehouse directory
-/ data/mysql data warehouse directory
# mkdir / data/mysql
# ls / data/
5 create new mysql users, groups and directories
#-create a new msyql group
# useradd-r-s / sbin/nologin-g mysql mysql-d / usr/local/mysql-New msyql users are prohibited from logging in to shell
6 change the owner of the directory
# cd / usr/local/mysql
# pwd
# chown-R mysql.
# chgrp-R mysql.
# chown-R mysql / data/mysql
7 configuration parameters
# bin/mysqld-initialize-user=mysql-basedir=/usr/local/mysql-datadir=/data/mysql
You need to pay attention to the temporary password generated by the record here, as above: YLi > 7ecpetYP
# bin/mysql_ssl_rsa_setup-datadir=/data/mysql
8 modify the system configuration file
# cp my-default.cnf / etc/my.cnf
# cp mysql.server / etc/init.d/mysql
# vim / etc/init.d/mysql
Modify the following:
[client]
Port=3306
# socket=/usr/local/mysql/mysql.sock
Socket=/data/mysql/mysql.sock
[mysqld]
Basedir=/usr/local/mysql
Datadir=/data/mysql
# socket=/usr/local/mysql/mysql.sock
Socket=/data/mysql/mysql.sock
Pid-file=/data/mysql/mysqld.pid
# vim / etc/my.cnf
Modify the following:
9 start mysql
# bin/mysqld_safe-- user=mysql &
Bin/mysql-user=root-p
-enter the temporary password generated in step 6
Mysql > set password=password ('A123456')
Mysql > grant all privileges on *. * to 'root'@'%' identified by' A123456'
Mysql > flush privileges
Mysql > use mysql
Mysql > select host,user from user
10 add system path
# vim / etc/profile
Add:
Export PATH=/usr/local/mysql/bin:$PATH
As follows:
# source / etc/profile
11 configure mysql to start automatically
# chmod 755 / etc/init.d/mysql
# chkconfig-add mysql
# chkconfig-- level 345 mysql on
The above is the linux environment Mysql 5.7.13 installation tutorial, I hope to be helpful to your study.
My.cn attached
/ etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# * * DO NOT EDIT THIS FILE. It's a template which will be copied to the
# * * default location during install, and will be replaced if you
# * * upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
Innodb_buffer_pool_size = 10G
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
Log_bin
Character-set-server=utf8
Collation-server=utf8_bin
Init-connect='SET NAMES utf8'
# These are commonly set, remove the # and set as required.
Basedir = / usr/local/mysql
Datadir = / export/mysql/var
Port = 3306
Server_id = 22206
Socket = / export/mysql/mysql.sock
Binlog_format = statement
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
Join_buffer_size = 128m
Sort_buffer_size = 2m
Read_rnd_buffer_size = 2m
Log_bin_trust_function_creators = on
Sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Lower_case_table_names=1
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.