這篇文章給大家介紹如何進(jìn)行MySQL5.6 二進(jìn)制部署,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。
10年積累的成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對客戶對網(wǎng)站的新想法和需求。提供各種問題對應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識你,你也不認(rèn)識我。但先網(wǎng)站策劃后付款的網(wǎng)站建設(shè)流程,更有隆陽免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。[root@hadoop-01 ~]# cd /usr/local [root@hadoop-01 local]# wget https://downloads.mariadb.com/archives/mysql-5.6/mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz [root@hadoop-01 local]# wget https://downloads.mariadb.com/archives/mysql-5.6/mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz.md5 [root@hadoop-01 local]# vi mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz.md5 61affe944eff55fcf51b31e67f25dc10 mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz [root@hadoop-01 local]# md5sum mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz 61affe944eff55fcf51b31e67f25dc10 mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz
[root@hadoop-01 local]# ps -ef|grep mysqld
[root@hadoop-01 local]# tar xzvf mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz [root@hadoop-01 local]# mv mysql-5.6.23-linux-glibc2.5-x86_64 mysql
[root@hadoop-01 local]# groupadd -g 101 dba [root@hadoop-01 local]# useradd -u 514 -g dba -G root -d /usr/local/mysql mysqladmin [root@hadoop-01 local]# id mysqladmin uid=514(mysqladmin) gid=101(dba) groups=101(dba),0(root) [root@hadoop-01 local]# passwd mysqladmin
[root@hadoop-01 local]# cp /etc/skel/.* /usr/local/mysql 創(chuàng)建配置文件 /etc/my.cnf(640) [root@hadoop-01 mysql]# vi /etc/my.cnf 刪除內(nèi)容,并將以下內(nèi)容復(fù)制進(jìn)去 [client] port = 3306 socket = /usr/local/mysql/data/mysql.sock [mysqld] port = 3306 socket = /usr/local/mysql/data/mysql.sock skip-external-locking key_buffer_size = 256M sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 4M query_cache_size= 32M max_allowed_packet = 16M myisam_sort_buffer_size=128M tmp_table_size=32M table_open_cache = 512 thread_cache_size = 8 wait_timeout = 86400 interactive_timeout = 86400 max_connections = 600 # Try number of CPU's*2 for thread_concurrency thread_concurrency = 32 #isolation level and default engine default-storage-engine = INNODB transaction-isolation = READ-COMMITTED server-id = 1 basedir = /usr/local/mysql datadir = /usr/local/mysql/data pid-file = /usr/local/mysql/data/hostname.pid #open performance schema log-warnings sysdate-is-now binlog_format = MIXED log_bin_trust_function_creators=1 log-error = /usr/local/mysql/data/hostname.err log-bin=/usr/local/mysql/arch/mysql-bin #other logs #general_log =1 #general_log_file = /usr/local/mysql/data/general_log.err #slow_query_log=1 #slow_query_log_file=/usr/local/mysql/data/slow_log.err #for replication slave #log-slave-updates #sync_binlog = 1 #for innodb options innodb_data_home_dir = /usr/local/mysql/data/ innodb_data_file_path = ibdata1:500M:autoextend innodb_log_group_home_dir = /usr/local/mysql/arch innodb_log_files_in_group = 2 innodb_log_file_size = 200M # rember change innodb_buffer_pool_size = 2048M innodb_additional_mem_pool_size = 50M innodb_log_buffer_size = 16M innodb_lock_wait_timeout = 100 #innodb_thread_concurrency = 0 innodb_flush_log_at_trx_commit = 1 innodb_locks_unsafe_for_binlog=1 #innodb io features: add for mysql5.5.8 performance_schema innodb_read_io_threads=4 innodb-write-io-threads=4 innodb-io-capacity=200 #purge threads change default(0) to 1 for purge innodb_purge_threads=1 innodb_use_native_aio=on #case-sensitive file names and separate tablespace innodb_file_per_table = 1 lower_case_table_names=1 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [mysqlhotcopy] interactive-timeout [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 2M write_buffer = 2M
[root@hadoop-01 local]# chown mysqladmin:dba /etc/my.cnf [root@hadoop-01 local]# chmod 640 /etc/my.cnf [root@hadoop-01 etc]# ll my.cnf -rw-r----- 1 mysqladmin dba 2201 Aug 25 23:09 my.cnf [root@hadoop-01 local]# chown -R mysqladmin:dba /usr/local/mysql [root@hadoop-01 local]# chmod -R 755 /usr/local/mysql [root@hadoop-01 local]# su - mysqladmin [mysqladmin@hadoop-01 ~]# pwd /usr/local/mysql [mysqladmin@hadoop-01 ~]# mkdir arch [mysqladmin@hadoop-01 ~]# scripts/mysql_install_db ###import Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory #缺少libaio.so 包 [root@hadoop-01 local]# yum -y install libaio
[mysqladmin@hadoop-01 ~]# scripts/mysql_install_db --user=mysqladmin --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@sht-sgmhadoopnn-01 ~]# cd /usr/local/mysql #將服務(wù)文件拷貝到init.d下,并重命名為mysql [root@sht-sgmhadoopnn-01 mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysql #賦予可執(zhí)行權(quán)限 [root@sht-sgmhadoopnn-01 mysql]# chmod +x /etc/rc.d/init.d/mysql #刪除服務(wù) [root@sht-sgmhadoopnn-01 mysql]# chkconfig --del mysql #添加服務(wù) [root@sht-sgmhadoopnn-01 mysql]# chkconfig --add mysql [root@sht-sgmhadoopnn-01 mysql]# chkconfig --level 345 mysql on [root@sht-sgmhadoopnn-01 mysql]# vi /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local su - mysqladmin -c "/etc/init.d/mysql start --federated" "/etc/rc.local" 9L, 278C written
[root@hadoop-01 mysql]# su - mysqladmin [mysqladmin@hadoop-01 ~]# pwd /usr/local/mysql [mysqladmin@hadoop-01 ~]# rm -rf my.cnf [mysqladmin@hadoop-01 ~]# bin/mysqld_safe & [mysqladmin@hadoop-01 ~]# ps -ef|grep mysqld [mysqladmin@hadoop-01 ~]# netstat -tulnp | grep mysql [root@hadoop-01 local]# service mysql status
[mysqladmin@hadoop-01 ~]# bin/mysql mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+
mysql> use mysql; mysql> update user set password=password('password') where user='root';
[mysqladmin@hadoop-01 ~]$ vi ./.bash_profile # insert export MYSQL_HOME=/usr/local/mysql export PATH=$MYSQL_HOME/bin:$PATH [mysqladmin@hadoop-01 ~]$ source ./.bash_profile
[mysqladmin@rzdatahadoop001 ~]$ rm -rf data [mysqladmin@rzdatahadoop001 ~]$ rm -rf arch/* [mysqladmin@rzdatahadoop001 ~]$ scripts/mysql_install_db --user=mysqladmin --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
關(guān)于如何進(jìn)行MySQL5.6 二進(jìn)制部署就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
分享標(biāo)題:如何進(jìn)行MySQL5.6二進(jìn)制部署-創(chuàng)新互聯(lián)
標(biāo)題網(wǎng)址:http://aaarwkj.com/article40/dgdceo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號、軟件開發(fā)、關(guān)鍵詞優(yōu)化、電子商務(wù)、建站公司、網(wǎng)站設(shè)計(jì)
聲明:本網(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)
猜你還喜歡下面的內(nèi)容