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

怎么用源碼安裝mysql5.6.35

這篇文章主要介紹“怎么用源碼安裝MySQL5.6.35”,在日常操作中,相信很多人在怎么用源碼安裝mysql5.6.35問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”怎么用源碼安裝mysql5.6.35”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

10年積累的網(wǎng)站設(shè)計、成都網(wǎng)站建設(shè)經(jīng)驗,可以快速應(yīng)對客戶對網(wǎng)站的新想法和需求。提供各種問題對應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識你,你也不認(rèn)識我。但先網(wǎng)站制作后付款的網(wǎng)站建設(shè)流程,更有韶關(guān)免費網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。

本次是在oracle linux 6.5上源碼安裝mysql5.6.35

#創(chuàng)建mysql用戶,用來啟動mysql服務(wù)
[root@jinzy mysql-5.6.35]# groupadd mysql
[root@jinzy mysql-5.6.35]# useradd -g mysql mysql

#相關(guān)軟件準(zhǔn)備
[root@jinzy ~]# cd /soft
[root@jinzy soft]# tar -xvf mysql-5.6.35.tar.gz
[root@jinzy soft]# chown  -R root:root mysql-5.6.35 

#創(chuàng)建mysql用戶,用來啟動mysql服務(wù)
[root@jinzy mysql-5.6.35]# groupadd mysql
[root@jinzy mysql-5.6.35]# useradd -g mysql mysql

#執(zhí)行cmake操作
在cmake之前要確定cmake,make,gcc,ncurses,libaio,bison相關(guān)包都已經(jīng)打上,否則會收到各種錯誤。

[root@jinzy mysql-5.6.35]# cmake -DBUILD_CONFIG=mysql_release -DCMAKE_INSTALL_PREFIX=/mysql/mysql-5.6.35
以下省略部分
.....
.....
-- Configuring done
-- Generating done
-- Build files have been written to: /soft/mysql-5.6.35

#執(zhí)行make操作,
[root@jinzy mysql-5.6.35]# make
以下省略部分
....
....
Linking CXX executable mysql_embedded
[ 99%] Built target mysql_embedded
Scanning dependencies of target mysqltest_embedded
[ 99%] Building CXX object libmysqld/examples/CMakeFiles/mysqltest_embedded.dir/__/__/client/mysqltest.cc.o
Linking CXX executable mysqltest_embedded
[ 99%] Built target mysqltest_embedded
Scanning dependencies of target my_safe_process
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
Linking CXX executable my_safe_process
[100%] Built target my_safe_process

#安裝mysql軟件操作
[root@jinzy mysql-5.6.35]# make install
以下省略部分
....
....
-- Installing: /mysql/mysql-5.6.35/sql-bench/test-select
-- Installing: /mysql/mysql-5.6.35/sql-bench/test-big-tables

# 執(zhí)行數(shù)據(jù)庫安裝操作
[root@jinzy mysql-5.6.35]# mkdir -p /mydata/db
[root@jinzy mysql-5.6.35]# chown -R mysql:mysql /mydata
這里給出了我配置的my.cnf文件,供參考
[mysql@jinzy ~]$ cat /mydata/db/my.cnf 
[mysql]

# CLIENT #
port                           = 3306
socket                         = /mydata/db/mysql.sock


[mysqld]


# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /mydata/db/mysql.sock
pid-file                       = /mydata/db/mysql.pid


# MyISAM #
key-buffer-size                = 32M
myisam-recover                 = FORCE,BACKUP


# SAFETY #
max-allowed-packet             = 16M
max-connect-errors             = 1000000


# DATA STORAGE #
datadir                        = /mydata/db/


# BINARY LOGGING #
log-bin                        = /mydata/db/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1


# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
max-connections                = 500
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 1024
table-open-cache               = 2048


# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 64M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 200M


# LOGGING #
log-error                      = /mydata/db/mysql-error.log
log-queries-not-using-indexes  = 1
slow-query-log                 = 1
slow-query-log-file            = /mydata/db/mysql-slow.log

[mysql@jinzy ~]$ cd /mysql/mysql-5.6.35/
[mysql@jinzy mysql-5.6.35]$ scripts/mysql_install_db --defaults-file=/mydata/db/my.cnf --user=mysql

Installing MySQL system tables...2017-01-17 19:06:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-17 19:06:45 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-01-17 19:06:45 0 [Note] ./bin/mysqld (mysqld 5.6.35-log) starting as process 6935 ...
OK

Filling help tables...2017-01-17 19:06:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-17 19:06:47 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-01-17 19:06:47 0 [Note] ./bin/mysqld (mysqld 5.6.35-log) starting as process 6957 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  ./bin/mysqladmin -u root password 'new-password'
  ./bin/mysqladmin -u root -h jinzy password 'new-password'

Alternatively you can run:

  ./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.


See the manual for more instructions.


You can start the MySQL daemon with:


  cd . ; ./bin/mysqld_safe &


You can test the MySQL daemon with mysql-test-run.pl


  cd mysql-test ; perl mysql-test-run.pl


......省略部分


#啟動mysql服務(wù)
[root@jinzy mysql-5.6.35]# cd /mysql/mysql-5.6.35/
[root@jinzy mysql-5.6.35]# ./bin/mysqld_safe --defaults-file=/mydata/db/my.cnf --user=mysql &
[1] 7774
[root@jinzy mysql-5.6.35]# 170117 21:17:11 mysqld_safe Logging to '/mydata/db/mysql-error.log'.
170117 21:17:11 mysqld_safe Starting mysqld daemon with databases from /mydata/db/

[root@jinzy mysql-5.6.35]# 
[root@jinzy mysql-5.6.35]# ps -ef | grep mysqld
root      7774  1091  0 21:17 pts/0    00:00:00 /bin/sh ./bin/mysqld_safe --defaults-file=/mydata/db/my.cnf --user=mysql
mysql     8227  7774  3 21:17 pts/0    00:00:00 ./bin/mysqld --defaults-file=/mydata/db/my.cnf --basedir=. --datadir=/mydata/db/ --plugin-dir=./lib/plugin --user=mysql --log-error=/mydata/db/mysql-error.log --open-files-limit=65535 --pid-file=/mydata/db/mysql.pid --socket=/mydata/db/mysql.sock
root      8251  1091  0 21:17 pts/0    00:00:00 grep mysqld

#測試服務(wù)
[root@jinzy mysql-5.6.35]# export MYSQL_UNIX_PORT=/mydata/db/mysql.sock
[root@jinzy mysql-5.6.35]# bin/mysqladmin version
bin/mysqladmin  Ver 8.42 Distrib 5.6.35, for Linux on x86_64
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.

Server version          5.6.35-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /mydata/db/mysql.sock
Uptime:                 4 min 33 sec

Threads: 1  Questions: 4  Slow queries: 0  Opens: 70  Flush tables: 1  Open tables: 63  Queries per second avg: 0.014

[root@jinzy mysql-5.6.35]# ./bin/mysqladmin -u root password
New password: 
Confirm new password: 
[root@jinzy mysql-5.6.35]# 

end!

到此,關(guān)于“怎么用源碼安裝mysql5.6.35”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

網(wǎng)站題目:怎么用源碼安裝mysql5.6.35
網(wǎng)站地址:http://www.chinadenli.net/article18/igppgp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)面包屑導(dǎo)航網(wǎng)站導(dǎo)航定制網(wǎng)站外貿(mào)建站外貿(mào)網(wǎng)站建設(shè)

廣告

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

外貿(mào)網(wǎng)站制作