最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

phpMyAdmin端口配置和mysql主從復(fù)制

2021-03-05 21:35 作者:無(wú)情劍客Burning  | 我要投稿

phpmMyAdmin

phpMyAdmin is a?free software?tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. 最重要的是免費(fèi)的,若不是navicat在ubuntu下沒(méi)有破解版,可能根本就不會(huì)關(guān)注它了,安裝可參考: https://www.cnblogs.com/xpwi/p/9821371.html

主界面

基本上可以和navicat匹配,不過(guò)支持的數(shù)據(jù)庫(kù)類型較navicat就差好多了。不過(guò)目前mysql的使用還是比較多的,phpMyAdmin基本足夠了。

端口修改

默認(rèn)端口是80,不過(guò)整個(gè)端口通常都會(huì)別占用,因此需要修改端口號(hào)。具體過(guò)程如下: 1 gedit /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
# ?change port to 8081
Listen 8081

<IfModule ssl_module>
? ?Listen 443
</IfModule>

<IfModule mod_gnutls.c>
? ?Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

2 gedit /etc/apache2/sites-available/000-default.conf

<VirtualHost *:8081>
? ?# The ServerName directive sets the request scheme, hostname and port that
? ?# the server uses to identify itself. This is used when creating
? ?# redirection URLs. In the context of virtual hosts, the ServerName
? ?# specifies what hostname must appear in the request's Host: header to
? ?# match this virtual host. For the default virtual host (this file) this
? ?# value is not decisive as it is used as a last resort host regardless.
? ?# However, you must set it for any further virtual host explicitly.
? ?#ServerName www.example.com

? ?ServerAdmin webmaster@localhost
? ?DocumentRoot /var/www/html

? ?# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
? ?# error, crit, alert, emerg.
? ?# It is also possible to configure the loglevel for particular
? ?# modules, e.g.
? ?#LogLevel info ssl:warn

? ?ErrorLog ${APACHE_LOG_DIR}/error.log
? ?CustomLog ${APACHE_LOG_DIR}/access.log combined

? ?# For most configuration files from conf-available/, which are
? ?# enabled or disabled at a global level, it is possible to
? ?# include a line for only one particular virtual host. For example the
? ?# following line enables the CGI configuration for this host only
? ?# after it has been globally disabled with "a2disconf".
? ?#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

mysql主從復(fù)制

使用場(chǎng)景

1.在業(yè)務(wù)復(fù)雜的系統(tǒng)中,有這么一個(gè)情景,有一句sql語(yǔ)句需要鎖表,導(dǎo)致暫時(shí)不能使用讀的服務(wù),那么就很影響運(yùn)行中的業(yè)務(wù),使用主從復(fù)制,讓主庫(kù)負(fù)責(zé)寫(xiě),從庫(kù)負(fù)責(zé)讀,這樣,即使主庫(kù)出現(xiàn)了鎖表的情景,通過(guò)讀從庫(kù)也可以保證業(yè)務(wù)的正常運(yùn)行。2.做數(shù)據(jù)的熱備,主庫(kù)宕機(jī)后能夠及時(shí)替換主庫(kù),保證業(yè)務(wù)可用性。3.架構(gòu)的擴(kuò)展。業(yè)務(wù)量越來(lái)越大,I/O訪問(wèn)頻率過(guò)高,單機(jī)無(wú)法滿足,此時(shí)做多庫(kù)的存儲(chǔ),降低磁盤(pán)I/O訪問(wèn)的頻率,提高單個(gè)機(jī)器的I/O性能。

MySQL主從復(fù)制的流程

4.主庫(kù)db的更新事件(update、insert、delete)被寫(xiě)到binlog5.主庫(kù)創(chuàng)建一個(gè)binlog dump thread,把binlog的內(nèi)容發(fā)送到從庫(kù)6.從庫(kù)啟動(dòng)并發(fā)起連接,連接到主庫(kù)7.從庫(kù)啟動(dòng)之后,創(chuàng)建一個(gè)I/O線程,讀取主庫(kù)傳過(guò)來(lái)的binlog內(nèi)容并寫(xiě)入到relay log8.從庫(kù)啟動(dòng)之后,創(chuàng)建一個(gè)SQL線程,從relay log里面讀取內(nèi)容,從Exec_Master_Log_Pos位置開(kāi)始執(zhí)行讀取到的更新事件,將更新內(nèi)容寫(xiě)入到slave的db

參考

https://blog.csdn.net/zai_xia/article/details/90379016 https://www.phpmyadmin.net/

公眾號(hào)

更多內(nèi)容,歡迎關(guān)注我的微信公眾號(hào): 無(wú)情劍客。


phpMyAdmin端口配置和mysql主從復(fù)制的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
饶阳县| 肥西县| 新兴县| 广南县| 临沭县| 清河县| 石景山区| 策勒县| 寻乌县| 海盐县| 郎溪县| 长子县| 孟津县| 宝山区| 正蓝旗| 湖南省| 滁州市| 武强县| 虎林市| 冀州市| 巴彦淖尔市| 新安县| 千阳县| 广水市| 武川县| 嫩江县| 九龙城区| 贵定县| 怀远县| 西吉县| 新余市| 正宁县| 淮北市| 马尔康县| 邹平县| 哈密市| 报价| 五寨县| 贵南县| 敦化市| 屯留县|