1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
      PerconaMySQL5.7Linux如何通用二進(jìn)制包安裝

      小編給大家分享一下Percona MySQL 5.7 Linux如何通用二進(jìn)制包安裝,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

      果洛州ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書(shū)未來(lái)市場(chǎng)廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書(shū)銷(xiāo)售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書(shū)合作)期待與您的合作!

      MySQL對(duì)libaio庫(kù)有依賴關(guān)系,如果沒(méi)有這個(gè)包,數(shù)據(jù)目錄初始化和接下來(lái)的服務(wù)啟動(dòng)會(huì)失敗。
      yum install libaio

      創(chuàng)建軟件安裝目錄
      mkdir  /mysql_software_57

      下載軟件
      Percona官網(wǎng)的下載頁(yè)面有兩個(gè)二進(jìn)制Tar包,分別對(duì)應(yīng)不同的發(fā)行版本
      ssl100 - Debian/Ubuntu
      ssl101 - for CentOS 6 and CentOS 7
      cd /mysql_software
      wget https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.17-11/binary/tarball/Percona-Server-5.7.17-11-Linux.x86_64.ssl101.tar.gz

      解壓安裝包
      [root@localhost mysql_software_57]# tar xvfz Percona-Server-5.7.17-11-Linux.x86_64.ssl101.tar.gz
      [root@localhost mysql_software_57]# ls
      Percona-Server-5.7.17-11-Linux.x86_64.ssl101
      Percona-Server-5.7.17-11-Linux.x86_64.ssl101.tar.gz
      [root@localhost mysql_software_57]# rm -rf Percona-Server-5.7.17-11-Linux.x86_64.ssl101.tar.gz 
      [root@localhost mysql_software_57]# ls
      Percona-Server-5.7.17-11-Linux.x86_64.ssl101
      [root@localhost mysql_software_57]# mv Percona-Server-5.7.17-11-Linux.x86_64.ssl101/* .
      [root@localhost mysql_software_57]# rmdir Percona-Server-5.7.17-11-Linux.x86_64.ssl101/

      創(chuàng)建mysql用戶
      [root@localhost ~]# groupadd mysql
      [root@localhost ~]# useradd -r -g mysql -s /bin/false mysql

      創(chuàng)建數(shù)據(jù)目錄和日志目錄
      [root@localhost mysql_software_57]# mkdir /mysql_data_57
      [root@localhost mysql_software_57]# mkdir /mysql_log_57

      [root@localhost mysql_software_57]# chmod 750 /mysql_data_57/

      [root@localhost mysql_software_57]# chown -R mysql.mysql /mysql_data_57/
      [root@localhost mysql_software_57]# chown -R mysql.mysql /mysql_log_57/

      編輯配置文件
      [root@localhost mysql_software_57]# vim /etc/my.cn

      點(diǎn)擊(此處)折疊或打開(kāi)

      1. [client]

      2. port                                                            = 3306

      3. socket                                                          = /mysql_data_57/mysql.sock

      4. [mysqld]

      5. #MySQL Server layer basic setting

      6. server-id                                                       = 1

      7. port                                                            = 3306

      8. socket                                                          = /mysql_data_57/mysql.sock

      9. #MySQL Server layer directory setting

      10. basedir                                                         = /mysql_software_57

      11. datadir                                                         = /mysql_data_57

      12. tmpdir                                                          = /mysql_data_57

      13. #MySQL Server layer connection setting

      14. max_connections                                         = 900

      15. #MySQL Server layer connection setting

      16. max_connections                                         = 900

      17. max_connect_errors                                      = 100000

      18. max_allowed_packet                                      = 16M

      19. back_log                                                        = 50

      20. #MySQL Server layer binlog setting

      21. log_bin_trust_function_creators         = on

      22. expire_logs_days                                        = 5

      23. binlog_cache_size                                       = 1M

      24. log-bin                                                         = /mysql_log_57/mysql-bin

      25. binlog_format                                           = mixed

      26. #MySQL Server layer memory management setting

      27. tmp_table_size                                          = 64M

      28. max_heap_table_size                                     = 64M

      29. read_buffer_size                                        = 2M

      30. read_rnd_buffer_size                            = 16M

      31. sort_buffer_size                                        = 8M

      32. join_buffer_size                                        = 16M

      33. query_cache_size                                        = 0

      34. thread_stack                                            = 192K

      35. query_cache_size                                        = 0

      36. thread_stack                                            = 192K

      37. #MySQL Server layer transaction management setting

      38. transaction_isolation                           = READ-COMMITTED

      39. autocommit                                                      = OFF

      40. #MySQL Server layer log related setting

      41. log_warnings                                            = 2                                             ##this value have been the default value in MySQL 5.7

      42. slow_query_log                                          = ON

      43. long_query_time                                         = 2

      44. slow_query_log_file                                     = /mysql_log_57/mysql-slow.log

      45. #log_queries_not_using_indexes          = 1

      46. #MySQL Server layer other behaviour setting

      47. sql_mode                                                        = PIPES_AS_CONCAT,IGNORE_SPACE,STRICT_TRANS_TABLES

      48. event_scheduler                                         = ON

      49. lower_case_table_names                          = 1

      50. explicit_defaults_for_timestamp         = ON

      51. default-storage-engine                          = INNODB

      52. explicit_defaults_for_timestamp         = ON

      53. default-storage-engine                          = INNODB

      54. ##ft_min_word_len                                       = 4

      55. # Statistic

      56. # userstat                                                      = ON

      57. # thread_statistics                                     = ON

      58. # End statistics

      59. # MyISAM Engine related setting

      60. key_buffer_size                                         = 32M

      61. bulk_insert_buffer_size                         = 64M

      62. myisam_sort_buffer_size                         = 128M

      63. myisam_max_sort_file_size                       = 10G

      64. myisam_repair_threads                           = 1

      65. #myisam_recover

      66. #InnoDB Engine related setting

      67. #InnoDB memory management related setting

      68. innodb_buffer_pool_size                         = 2G

      69. innodb_max_dirty_pages_pct                      = 90

      70. innodb_sync_array_size                          = 16

      71. innodb_max_dirty_pages_pct                      = 90

      72. innodb_sync_array_size                          = 16

      73. #table open cache related

      74. table_open_cache                                        = 4096

      75. table_open_cache_instances                      = 16

      76. #innodb_additional_mem_pool_size        = 16M           ##This variable have been removed MySQL 5.7

      77. #innodb_numa_interleave                         = 1     ##Only work with Percona 5.6.27 and later

      78. ##InnoDB engine I/O related setting

      79. innodb_write_io_threads                         = 8

      80. innodb_read_io_threads                          = 8

      81. innodb_flush_method                                     = O_DIRECT

      82. #InnoDB engine File management related setting

      83. innodb_data_file_path                           = ibdata1:12M:autoextend        #10M-->12M, 12M is default values, it is meaningless to set it to 10M

      84. innodb_file_per_table                           = 1     #this value have been the default value in MySQL 5.7

      85. innodb_data_file_path                           = ibdata1:12M:autoextend        #10M-->12M, 12M is default values, it is meaningless to set it to 10M

      86. innodb_file_per_table                           = 1     #this value have been the default value in MySQL 5.7

      87. innodb_file_format                                      = Barracuda  #this value have been the default value in MySQL 5.7

      88. #InnoDB engine undo log related setting

      89. innodb_undo_directory                           = /mysql_data_57

      90. innodb_undo_tablespaces                         = 4

      91. innodb_purge_batch_size                         = 5000

      92. innodb_purge_threads                            = 8

      93. #InnoDB engine redo log related setting

      94. innodb_flush_log_at_trx_commit          = 2

      95. innodb_log_buffer_size                          = 8M

      96. innodb_log_file_size                            = 256M

      97. innodb_log_files_in_group                       = 3

      98. innodb_log_group_home_dir                       = /mysql_log_57

      99. #InnoDB engine lock and transaction management setting

      100. innodb_lock_wait_timeout                        = 120

      101. innodb_lock_wait_timeout                        = 120

      102. #InnoDB engine other behaviour setting

      103. innodb_large_prefix                                     = ON       ##this value have been the default value in MySQL 5.7

      104. innodb_strict_mode                                      = ON        ##this value have been the default value in MySQL 5.7

      105. innodb_checksum_algorithm                       = crc32 ##this value have been the default value in MySQL 5.7

      106. [mysqldump]

      107. quick

      108. max_allowed_packet                                      = 16M

      109. [mysql]

      110. no-auto-rehash

      111. # Only allow UPDATEs and DELETEs that use keys.

      112. #safe-updates

      113. [myisamchk]

      114. key_buffer_size                                         = 512M

      115. sort_buffer_size                                        = 512M

      116. key_buffer_size                                         = 512M

      117. sort_buffer_size                                        = 512M

      118. read_buffer                                             = 8M

      119. write_buffer                                            = 8M

      120. [mysqlhotcopy]

      121. interactive-timeout

      122. [mysqld_safe]

      123. # Increase the amount of open files allowed per process. Warning: Make

      124. # sure you have set the global system limit high enough! The high value

      125. # is required for a large number of opened tables

      126. open-files-limit                                        = 8192

      127. log-error                                                       = /mysql_log_57/mysqld_error.log


      初始化MySQL數(shù)據(jù)庫(kù)的數(shù)據(jù)文件路徑,并且創(chuàng)建系統(tǒng)表
      5.7.6及以上版本,要使用mysqld來(lái)初始化數(shù)據(jù)庫(kù)
      [root@localhost mysql_software_57]# bin/mysqld --defaults-file=/etc/my.cnf --initialize-insecure --user=mysql
      ...
      2017-04-02T07:54:13.022906Z 0 [Note] Shutting down slave threads
      2017-04-02T07:54:13.022915Z 0 [Note] Forcefully disconnecting 0 remaining clients
      2017-04-02T07:54:13.068736Z 0 [Note] Binlog end
      2017-04-02T07:54:13.072400Z 0 [Note] InnoDB: FTS optimize thread exiting.
      2017-04-02T07:54:13.072548Z 0 [Note] InnoDB: Starting shutdown...
      2017-04-02T07:54:13.173584Z 0 [Note] InnoDB: Dumping buffer pool(s) to /mysql_data_57/ib_buffer_pool
      2017-04-02T07:54:13.174062Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170402  0:54:13
      2017-04-02T07:54:14.956340Z 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
      2017-04-02T07:54:16.679052Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2411492
      2017-04-02T07:54:16.679587Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

      啟動(dòng)數(shù)據(jù)庫(kù)
      [root@localhost mysql_software_57]# bin/mysqld_safe --defaults-file=/etc/my.cnf &

      [root@localhost mysql_software_57]# 2017-04-02T08:02:36.065640Z mysqld_safe Logging to '/mysql_log_57/mysqld_error.log'.
      2017-04-02T08:02:36.068876Z mysqld_safe error: log-error set to '/mysql_log_57/mysqld_error.log', however file don't exists. Create writable for user 'mysql'.

      [1]+  Exit 1                  bin/mysqld_safe --defaults-file=/etc/my.cnf

      日志文件不存在報(bào)錯(cuò),手動(dòng)創(chuàng)建日志文件
      [root@localhost mysql_log_57]# su - mysql
      [mysql@localhost ~]$ cd /mysql_log_57/
      [mysql@localhost mysql_log_57]$ touch mysqld_error.log

      再次啟動(dòng)數(shù)據(jù)庫(kù)
      [root@localhost mysql_software_57]# bin/mysqld_safe --defaults-file=/etc/my.cnf &
      [1] 37100
      [root@localhost mysql_software_57]# 2017-04-02T08:03:44.853263Z mysqld_safe Logging to '/mysql_log_57/mysqld_error.log'.
      2017-04-02T08:03:44.857901Z mysqld_safe Logging to '/mysql_log_57/mysqld_error.log'.
      2017-04-02T08:03:44.922034Z mysqld_safe Starting mysqld daemon with databases from /mysql_data_57

      更改root密碼

      [root@localhost mysql_software_57]# bin/mysql -uroot -p
      Enter password: 
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 4
      Server version: 5.7.17-11-log Percona Server (GPL), Release 11, Revision f60191c

      Copyright (c) 2009-2016 Percona LLC and/or its affiliates
      Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.

      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

      mysql> set password = password('root');
      Query OK, 0 rows affected, 1 warning (0.01 sec)

      mysql> flush privileges;
      Query OK, 0 rows affected (0.00 sec)

      以上是“Percona MySQL 5.7 Linux如何通用二進(jìn)制包安裝”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


      當(dāng)前名稱:PerconaMySQL5.7Linux如何通用二進(jìn)制包安裝
      新聞來(lái)源:http://www.ef60e0e.cn/article/jccsip.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        梁平县| 赤壁市| 东乡县| 吴忠市| 杭锦旗| 和顺县| 类乌齐县| 和龙市| 清苑县| 获嘉县| 瑞丽市| 阿城市| 和硕县| 彝良县| 辽源市| 新邵县| 南雄市| 策勒县| 岳普湖县| 雅安市| 高阳县| 河曲县| 银川市| 出国| 米林县| 平江县| 天等县| 新密市| 安国市| 梁山县| 铅山县| 普兰县| 句容市| 朝阳市| 射阳县| 平昌县| 玉山县| 建宁县| 潜山县| 通道| 望奎县|