欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

mysql 5.7.19 二進(jìn)制最新安裝

 更新時(shí)間:2017年10月10日 09:50:06   投稿:mrr  
這篇文章主要介紹了mysql 5.7.19 二進(jìn)制最新安裝的相關(guān)資料,需要的朋友可以參考下

首先從官網(wǎng)下載zip archive版本http://dev.mysql.com/downloads/mysql/

MySQL v5.7.19 官方正式版(32/64位 安裝版與zip解壓版)

一、優(yōu)化部分

1.操作系統(tǒng)參數(shù)調(diào)優(yōu)

2.數(shù)據(jù)庫(kù)參數(shù)調(diào)優(yōu)

3.防火墻設(shè)置等

#############################

二、安裝部分

1.創(chuàng)建用戶和組

# groupadd mysql
# useradd -g mysql mysql

2.創(chuàng)建數(shù)據(jù)庫(kù)安裝目錄、授權(quán)

# mkdir /mysql /mysql/data /mysql/log 
# chown -R mysql:mysql /usr/local/mysql 

3.到安裝目錄,解壓安裝文件

#cd /usr/local
# tar -zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
# mv mysql-5.7.19-linux-glibc2.12-x86_64 mysql

4.授權(quán)

# chown -R mysql.mysql mysql

5.驗(yàn)證權(quán)限

# ls -l mysql
total 52
drwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 bin
-rw-r--r-- 1 mysql mysql 17987 Jun 22 22:13 COPYING
drwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 docs
drwxr-xr-x 3 mysql mysql 4096 Aug 8 04:06 include
drwxr-xr-x 5 mysql mysql 4096 Aug 8 04:06 lib
drwxr-xr-x 4 mysql mysql 4096 Aug 8 04:06 man
-rw-r--r-- 1 mysql mysql 2478 Jun 22 22:13 README
drwxr-xr-x 28 mysql mysql 4096 Aug 8 04:06 share
drwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 support-files

6.編輯參數(shù)文件

vim /etc/my.cnf
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
server_id=10
port = 3306
user = mysql
character-set-server = utf8mb4
default_storage_engine = innodb
log_timestamps = SYSTEM
socket = /tmp/mysql.sock
basedir = /usr/local/mysql
datadir = /mysql/data
pid-file = /mysql/data/mysql.pid
max_connections = 1000
max_connect_errors = 1000
table_open_cache = 1024
max_allowed_packet = 128M
open_files_limit = 65535
#####====================================[innodb]==============================
innodb_buffer_pool_size = 1024M
innodb_file_per_table = 1
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_purge_threads = 2
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 512M
innodb_log_files_in_group = 2
innodb_log_buffer_size = 16M
innodb_max_dirty_pages_pct = 80
innodb_lock_wait_timeout = 30
innodb_data_file_path=ibdata1:1024M:autoextend
innodb_undo_tablespaces=3
#####====================================[log]==============================
log_error = /mysql/log/mysql-error.log 
slow_query_log = 1
long_query_time = 1 
slow_query_log_file = /mysql/log/mysql-slow.log
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

7.安裝數(shù)據(jù)庫(kù)

# ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/data --innodb_undo_tablespaces=3 --explicit_defaults_for_timestamp

8.配置啟動(dòng)文件

cp support-files/mysql.server /etc/init.d/mysql
chkconfig --add mysql
chkconfig mysql on
service mysql start

9.配置環(huán)境變量

vi /etc/profile
#for mysql 
mysql_home=/usr/local/mysql
PATH=$PATH:$mysql_home/bin
source /etc/profile

10.查看默認(rèn)密碼

grep -i password /mysql/log/mysql-error.log 

11.初始化密碼

mysql -uroot -p‘xxxxx‘
SET PASSWORD=PASSWORD(‘root‘);
flush privileges;

12.數(shù)據(jù)庫(kù)常規(guī)啟停

# mysqladmin -uroot -proot shutdown
#mysqld_safe --defaults-file=/etc/my.cnf &
#ps -ef|grep mysql

13.安全配置

# mysql_secure_installation 
Securing the MySQL server deployment.
Enter password for user root: 
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: y
There are three levels of password validation policy:
LOW  Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary         file
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
Using existing password for root.
Estimated strength of the password: 25 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y
New password: 
Re-enter new password: 
Sorry, passwords do not match.
New password: 
Re-enter new password: 
Sorry, passwords do not match.
New password: 
Re-enter new password: 
Estimated strength of the password: 50 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
 ... Failed! Error: Your password does not satisfy the current policy requirements
New password: 
Re-enter new password: 
Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
‘localhost‘. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named ‘test‘ that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.
 - Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done! 

相關(guān)閱讀:

Mysql在各個(gè)系統(tǒng)的安裝教程

Mysql 5.7.19 免安裝版配置方法教程詳解(64位)

Mysql 5.7.19 免安裝版遇到的坑(收藏)

MySQL 5.7.19安裝目錄下創(chuàng)建my.ini文件的方法

總結(jié)

以上所述是小編給大家介紹的mysql 5.7.19 二進(jìn)制最新安裝,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

  • MYSQL刪除匿名用戶的方法(提高安全性)

    MYSQL刪除匿名用戶的方法(提高安全性)

    今天看教程的時(shí)候,發(fā)現(xiàn)了MYSQL匿名用戶可以導(dǎo)致網(wǎng)站數(shù)據(jù)等安全問(wèn)題,這里分享下mysql中刪除匿名用戶的步驟,方便需要的朋友
    2012-10-10
  • MySQL優(yōu)化案例之隱式字符編碼轉(zhuǎn)換

    MySQL優(yōu)化案例之隱式字符編碼轉(zhuǎn)換

    這篇文章主要介紹了MySQL優(yōu)化案例之隱式字符編碼轉(zhuǎn)換,隱式類型轉(zhuǎn)換也會(huì)導(dǎo)致同樣的放棄走樹(shù)搜索,更多相關(guān)內(nèi)容具有一定的參考價(jià)值,需要的朋友可以參考一下
    2022-07-07
  • mysql 5.7.14 下載安裝配置方法圖文教程

    mysql 5.7.14 下載安裝配置方法圖文教程

    這篇文章主要為大家分享了mysql 5.7.14 下載安裝配置方法圖文教程,感興趣的朋友可以參考一下
    2016-08-08
  • MySQL如何利用DCL管理用戶和控制權(quán)限

    MySQL如何利用DCL管理用戶和控制權(quán)限

    這篇文章主要介紹了MySQL如何利用DCL管理用戶和控制權(quán)限,幫助大家更好的理解和學(xué)習(xí)MySQL的使用,感興趣的朋友可以了解下
    2020-11-11
  • mysql壓力測(cè)試腳本實(shí)例

    mysql壓力測(cè)試腳本實(shí)例

    這篇文章主要介紹了mysql壓力測(cè)試腳本,實(shí)例展示了實(shí)現(xiàn)MySQL壓力測(cè)試的完整方法,需要的朋友可以參考下
    2014-11-11
  • Mysql存儲(chǔ)引擎詳解

    Mysql存儲(chǔ)引擎詳解

    存儲(chǔ)引擎其實(shí)就是如何實(shí)現(xiàn)存儲(chǔ)數(shù)據(jù),如何為存儲(chǔ)的數(shù)據(jù)建立索引以及如何更新,查詢數(shù)據(jù)等技術(shù)實(shí)現(xiàn)的方法。本文我們來(lái)詳細(xì)探討下MySQL中的幾個(gè)存儲(chǔ)引擎(MyISAM、InnoDB、archive、MERGE)的相關(guān)知識(shí)
    2016-12-12
  • Linux下自動(dòng)備份MySQL的方法

    Linux下自動(dòng)備份MySQL的方法

    這篇文章主要介紹了Linux下自動(dòng)備份MySQL的方法,需要的朋友可以參考下
    2015-01-01
  • mysql的select?into給多個(gè)字段變量賦值方式

    mysql的select?into給多個(gè)字段變量賦值方式

    這篇文章主要介紹了mysql的select?into給多個(gè)字段變量賦值方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-09-09
  • MySQL設(shè)置白名單限制的實(shí)現(xiàn)

    MySQL設(shè)置白名單限制的實(shí)現(xiàn)

    白名單是一種機(jī)制,用于限制哪些主機(jī)可以連接到服務(wù)器,而阻止其他主機(jī)的訪問(wèn),本文主要介紹了MySQL設(shè)置白名單限制的實(shí)現(xiàn),具有一定的參考價(jià)值,感興趣的可以了解一下
    2024-08-08
  • MySQL 修改密碼實(shí)例詳解

    MySQL 修改密碼實(shí)例詳解

    這篇文章主要介紹了MySQL 修改密碼實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下
    2017-07-07

最新評(píng)論