欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

mariaDB10.1源碼如何安裝

這篇文章主要為大家展示了“mariaDB 10.1源碼如何安裝”,內(nèi)容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“mariaDB 10.1源碼如何安裝”這篇文章吧。

創(chuàng)新互聯(lián)專注于企業(yè)營銷型網(wǎng)站建設(shè)、網(wǎng)站重做改版、夏邑網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、HTML5建站商城網(wǎng)站建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為夏邑等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

[root@localhost yum.repos.d]# yum -y install gcc*

[root@localhost yum.repos.d]# yum -y install ncurses-devel

[root@localhost yum.repos.d]# yum install bison bison-devel ncurses libxml2 libxml2-devel cmake  #cmake 要求版本2.8以上

[root@localhost ~]# useradd MySQL

[root@localhost ~]# mkdir /mariaDB/{data,logs,socket} -p

[root@localhost ~]# chown mysql:mysql /mariaDB/ -R

[root@localhost ~]# chmod 777 /mariaDB/socket/

[root@localhost ~]# tar -xzvf mariadb-10.1.22.tar.gz

[root@localhost ~]# cd mariadb-10.1.22

cmake \

-DCMAKE_INSTALL_PREFIX=/mariaDB \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DENABLED_LOCAL_INFILE=ON \

-DWITH_XTRADB_STORAGE_ENGINE=1 \

-DWITH_MYISAM_STORAGE_ENGINE=1 \

-DWITH_INNOBASE_STORAGE_ENGINE=1 \

-DWITH_FEDERATEDX_STORAGE_ENGINE=1 \

-DWITH_PARTITION_STORAGE_ENGINE=1 \

-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \

-DCOMPILATION_COMMENT='MariaDB 10.1 production environment' \

-DWITH_READLINE=ON \

-DSYSCONFDIR=/mariaDB/data \

-DMYSQL_UNIX_ADDR=/mariaDB/socket/socket \

-DMYSQL_DATADIR=/mariaDB/data

[root@localhost ~]# make

[root@localhost ~]# make install

[root@localhost ~]# vi /mariaDB/my.cnf

[client]

port = 3306

socket = /mariaDB/data/mysql.sock

[mysql]

no-auto-rehash

[mysqld]

server-id = 1

user = mysql

port = 3306

socket = /mariaDB/socket/mysql.sock

basedir = /mariaDB

datadir = /mariaDB/data

default-storage-engine = InnoDB

external-locking = FALSE

skip-name-resolve

#connect options

back_log = 600  #

max_connections = 1000

max_connect_errors = 10    #number which allow to connect server for error password  

connect_timeout=20   #The number of seconds that the mysqld server waits for a connect packet

max_allowed_packet = 32M

### Table Cache Settings

table_open_cache = 800  ## Range: 64~ 524288

open_files_limit = 5000

tmp_table_size = 2G               #recommend same size as tmp_table_size

max_heap_table_size = 2G     #recommend 256 min

### Thread Cache

thread_cache_size = 64

#thread_stack = 192K

### Query Cache  

query_cache_size = 64M

query_cache_limit = 4M

### Per-Thread Buffers

sort_buffer_size = 2M

read_buffer_size = 2M

read_rnd_buffer_size = 16M

bulk_insert_buffer_size = 64M

join_buffer_size = 2M

thread_stack = 512k

##transaction infomation

transaction_isolation = READ-COMMITTED

#slog log

slow_query_log_file=/mariaDB/logs/slow-log.log

slow_query_log=1

long_query_time=4   #set time when executing is more this time,the sql be writen in slow log

log_queries_not_using_indexes=1  #when executing sql,the table have not index for the sql, the sql will be writen in slow log

##bin log

log-bin = /mariaDB/logs/ray-bin.log

binlog_cache_size = 10M

max_binlog_cache_size = 8M

max_binlog_size = 128M

expire_logs_days = 7

binlog_format = ROW

binlog_stmt_cache_size = 10M

key_buffer_size = 256MB

lower_case_table_names = 1

###innodb options

innodb_buffer_pool_instances=8

innodb_file_per_table = on

innodb_thread_concurrency = 8

innodb_read_io_threads = 16     ##2*cpu個(gè)數(shù)*cpu核數(shù),個(gè)人建議與cpu核數(shù)相等或2倍

innodb_write_io_threads = 16

##innodb memery

innodb_buffer_pool_size = 512M

innodb_max_dirty_pages_pct = 70

innodb_lock_wait_timeout = 120

##redo log

innodb_log_buffer_size = 16M

innodb_log_file_size = 128M

innodb_log_files_in_group = 3

innodb_flush_log_at_trx_commit = 1

autocommit=0

#set independent undo

innodb_undo_directory=/mariaDB/data

innodb_undo_logs=128

innodb_undo_tablespaces=4

[mysqldump]

quick

max_allowed_packet = 32M

[mysqld_safe]

log-error=/mariaDB/logs/mysql_ray.err

pid-file=/mariaDB/data/ray.pid

/mariaDB/scripts/mysql_install_db --user=mysql --basedir=/mariaDB --datadir=/mariaDB/data --innodb_undo_tablespaces=4 --defaults-file=/mariaDB/my.cnf

/mariaDB/bin/mysqld_safe --defaults-file=/mariaDB/my.cnf 2>&1 > /dev/null &

vi /mariaDB/mysqld

#!/bin/bash

mysql_port=3306

mysql_username="root"

mysql_password="123456"

function_start_mysql()

{

printf "Starting MySQL...\n"

/bin/sh /mariaDB/bin/mysqld_safe --defaults-file=/mariaDB/my.cnf 2>&1 > /dev/null &

}

function_stop_mysql()

{

printf "Stoping MySQL...\n"

/mariaDB/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -S /mariaDB/socket/mysql.sock shutdown

}

function_restart_mysql()

{

printf "Restarting MySQL...\n"

function_stop_mysql

function_start_mysql

}

function_kill_mysql()

{

kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')

kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')

}

case $1 in

start)

function_start_mysql;;

stop)

function_stop_mysql;;

kill)

function_kill_mysql;;

restart)

function_stop_mysql

function_start_mysql;;

*)

echo "Usage: /mariaDB/mysqld {start|stop|restart|kill}";;

esac

修改root密碼

[root@MariaDB ~]# mysqladmin -uroot password '123456'

[root@MariaDB ~]# mysql -uroot -p'123456' -S /mariaDB/socket/mysql.sock

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

當(dāng)前文章:mariaDB10.1源碼如何安裝
標(biāo)題網(wǎng)址:http://chinadenli.net/article40/ggpceo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站網(wǎng)站收錄微信公眾號商城網(wǎng)站ChatGPT網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司