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

數(shù)據(jù)庫簡介與MySQL5.7版本編譯安裝(實(shí)戰(zhàn)!)

數(shù)據(jù)庫的基本概念

數(shù)據(jù):

  • 描述事物的符號(hào)記錄稱為數(shù)據(jù)(Data);
  • 包括數(shù)字,文字、圖形、圖像、聲音、檔案記錄等;
  • 以“記錄”形式按統(tǒng)一的格式進(jìn)行存儲(chǔ)。

表:

  • 將不同的記錄組織在一起,就形成了“表”
  • 是用來存儲(chǔ)具體數(shù)據(jù)的

數(shù)據(jù)庫:

  • 數(shù)據(jù)庫就是表的集合,是存儲(chǔ)數(shù)據(jù)的倉庫
  • 以一定的組織方式存儲(chǔ)的相互有關(guān)的數(shù)據(jù)

數(shù)據(jù)庫系統(tǒng)發(fā)展史

第一代數(shù)據(jù)庫

自20世紀(jì)60年代起,第一代數(shù)據(jù)庫系統(tǒng)問世。它們是層次模型與網(wǎng)狀模型的數(shù)據(jù)庫系統(tǒng),為統(tǒng)一管理和共享數(shù)據(jù)提供了有力的支撐

創(chuàng)新互聯(lián)從2013年成立,先為花山等服務(wù)建站,花山等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為花山企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

第二代數(shù)據(jù)庫

  • 20世紀(jì)70年代初,第二代數(shù)據(jù)庫——關(guān)系數(shù)據(jù)庫開始出現(xiàn)
  • 20世紀(jì)80年代初,IBM公司的關(guān)系數(shù)據(jù)庫系統(tǒng)DB2問世,作為第二代數(shù)據(jù)庫系統(tǒng)的關(guān)系數(shù)據(jù)庫,開始逐步取代層次與網(wǎng)狀模型的數(shù)據(jù)庫,成為占主導(dǎo)地位的數(shù)據(jù)庫,成為行業(yè)主流。到目前為止,關(guān)系數(shù)據(jù)庫系統(tǒng)仍占領(lǐng)數(shù)據(jù)庫應(yīng)用的主要地位

第三代數(shù)據(jù)庫

  • 自20世紀(jì)80年代起,各種適應(yīng)不同領(lǐng)域的新型數(shù)據(jù)庫系統(tǒng)不斷涌現(xiàn),如工程數(shù)據(jù)庫、多媒體數(shù)據(jù)庫、圖形數(shù)據(jù)庫、智能數(shù)據(jù)庫、分布式數(shù)據(jù)庫及面向?qū)ο髷?shù)據(jù)庫等,特別是面向?qū)ο髷?shù)據(jù)庫系統(tǒng),由于其實(shí)用性強(qiáng)、適應(yīng)面廣而受到人們的青睞
  • 20世紀(jì)90年代后期,形成了多種數(shù)據(jù)庫系統(tǒng)共同支撐應(yīng)用的局面。當(dāng)然,在商務(wù)應(yīng)用方面,依然還是關(guān)系數(shù)據(jù)庫占主流,不過已經(jīng)有一些新的元素被添加進(jìn)主流商務(wù)數(shù)據(jù)庫系統(tǒng)中。例如,Oracle支持的"關(guān)系對(duì)象”數(shù)據(jù)庫模型

主流的數(shù)據(jù)庫介紹

SQL Server (微軟公司產(chǎn)品)

  • 面向Windows操作系統(tǒng)
  • 簡單、易用、幾乎沒人用

Oracle (甲骨文公司產(chǎn)品)

  • 面向所有主流平臺(tái)
  • 安全、完善,操作復(fù)雜

DB2 (IBM公司產(chǎn)品)

  • 面向所有主流平臺(tái)
  • 大型、安全、完善

MySQL (甲骨文公司收購)

  • 免費(fèi)、開源、體積小

sybase(關(guān)系型數(shù)據(jù)庫,美國Sybase公司產(chǎn)品)

  • 大型、完善

關(guān)系型數(shù)據(jù)庫

  • 關(guān)系數(shù)據(jù)庫系統(tǒng)是基于關(guān)系模型的數(shù)據(jù)庫系統(tǒng),它的基本概念來自于關(guān)系模型

  • 關(guān)系模型建立在關(guān)系代數(shù)的理論基礎(chǔ)上,數(shù)據(jù)結(jié)構(gòu)使用簡單易懂的二維數(shù)據(jù)表,可以用簡單的“實(shí)體-關(guān)系”(E-R)圖來直接表示

  • E-R圖中包含了實(shí)體(數(shù)據(jù)對(duì)象)、關(guān)系和屬性三個(gè)要素

  • 所有實(shí)體及實(shí)體之間聯(lián)系的集合構(gòu)成一個(gè)關(guān)系數(shù)據(jù)庫

  • 關(guān)系數(shù)據(jù)庫的存儲(chǔ)結(jié)構(gòu)是二維表格,反映事物及其聯(lián)系的數(shù)據(jù)是以表格形式保存的

  • 在每個(gè)二維表中,每一行稱為一條記錄,用來描述一個(gè)對(duì)象的信息;每一列稱為一個(gè)字段,用來描述對(duì)象的一個(gè)屬性

數(shù)據(jù)庫簡介與MySQL5.7版本編譯安裝(實(shí)戰(zhàn)?。?></p><h4>實(shí)體</h4><p>也稱為實(shí)例,對(duì)應(yīng)現(xiàn)實(shí)世界中可區(qū)別于其他對(duì)象的"事件”或事物”,如銀行客戶、銀行賬戶等</p><h4>屬性</h4><p>實(shí)體所具有的某一特性,一個(gè)實(shí)體可以有多個(gè)屬性。例如,“銀行客戶”實(shí)體集中的每個(gè)實(shí)體均具有姓名、住址、電話等屬性</p><h4>聯(lián)系</h4><p>實(shí)體集之間的對(duì)應(yīng)關(guān)系稱為聯(lián)系,也稱為關(guān)系。例如,銀行客戶和銀行賬戶之間存在“儲(chǔ)蓄”的關(guān)系</p><h4>關(guān)系型數(shù)據(jù)庫</h4><ul><li>Oracle ,MySQL</li><li>SQLServer、Sybase</li><li>Informix、access</li><li>DB2、FoxPRO</li></ul><h4>關(guān)系型數(shù)據(jù)庫應(yīng)用舉例</h4><ul><li>12306用戶信息系統(tǒng)</li><li>淘寶賬號(hào)信息系統(tǒng)、支付寶賬號(hào)系統(tǒng)移動(dòng)、電信、聯(lián)通手機(jī)號(hào)信息系統(tǒng)、計(jì)費(fèi)系統(tǒng)銀行用戶賬號(hào)系統(tǒng)</li><li>網(wǎng)站用戶信息系統(tǒng)</li></ul><h4>非關(guān)系型數(shù)據(jù)庫介紹</h4><p>1、非關(guān)系數(shù)據(jù)庫也被稱作NOSQL(Not Only SQL),存儲(chǔ)數(shù)據(jù)不以關(guān)系模型為依據(jù),不需要固定的表格式</p><p>2、非關(guān)系型數(shù)據(jù)庫作為關(guān)系數(shù)據(jù)庫的一一個(gè)補(bǔ)充,在日益快速發(fā)展的網(wǎng)站時(shí)代,發(fā)揮著高效率與高性能</p><p>3、非關(guān)系型數(shù)據(jù)庫的優(yōu)點(diǎn):</p><ul><li>數(shù)據(jù)庫高并發(fā)讀寫的需求</li><li>對(duì)海量數(shù)據(jù)高效率存儲(chǔ)與訪問</li><li>數(shù)據(jù)庫的高擴(kuò)展性與高可用性的需求</li><li><p>4、鍵-值方式(key-value),以鍵為依據(jù)存儲(chǔ)、刪、改數(shù)據(jù)</p></li></ul><p>5、列存儲(chǔ)(Column-oriented),將相關(guān)的數(shù)據(jù)存儲(chǔ)在列族中</p><p>6、文檔的方式,數(shù)據(jù)庫由一系列數(shù)據(jù)項(xiàng)組成,每個(gè)數(shù)據(jù)項(xiàng)都有名稱與對(duì)應(yīng)的值</p><p>7、圖形方式,實(shí)體為頂點(diǎn),關(guān)系為邊,數(shù)據(jù)保存為一個(gè)圖形</p><p>8、Memcached是一個(gè)開源的、高性能的、具有分布式內(nèi)存對(duì)象的緩存系統(tǒng),以key-value方式存儲(chǔ)數(shù)據(jù)</p><ul><li>緩存數(shù)據(jù)以減輕數(shù)據(jù)庫壓力并能加快訪問速度</li><li>加速動(dòng)態(tài)Web應(yīng)用</li><li>緩存的內(nèi)容保存在內(nèi)存中</li></ul><p>9、redis也是一個(gè)以key-value方式存儲(chǔ)數(shù)據(jù)的,數(shù)據(jù)也是保存在內(nèi)存中,但會(huì)定期將數(shù)據(jù)寫入磁盤中</p><p>10、相對(duì)于Memcached有以下特點(diǎn):</p><ul><li>支持內(nèi)存緩存</li><li>支持持久化</li><li>數(shù)據(jù)類型更多</li><li>支持集群、分布式</li><li>支持隊(duì)列</li></ul><p>11、redis應(yīng)用舉例</p><ul><li>數(shù)據(jù)庫前端緩存</li><li>session共享</li><li>當(dāng)需要緩存除了key/value之外的更多數(shù)據(jù)類型時(shí)</li><li>當(dāng)緩存的數(shù)據(jù)需要長久保存時(shí)</li></ul><h2>MySQL數(shù)據(jù)庫介紹</h2><p>MySQL是一款深受歡迎的開源關(guān)系型數(shù)據(jù)庫</p><p>Oracle旗下的產(chǎn)品</p><p>遵守了GPL協(xié)議,可以免費(fèi)使用與修改</p><h4>特點(diǎn):</h4><ul><li>性能卓越、服務(wù)穩(wěn)定</li><li>開源、無版權(quán)限制、成本低</li><li>多線程、多用戶</li><li>基于C/S (客戶端/<a title=服務(wù)器)架構(gòu).

  • 安全可靠
  • MySQL商業(yè)版與社區(qū)版

    MySQL商業(yè)版是由MySQL AB公司負(fù)責(zé)開發(fā)與維護(hù),需要付費(fèi)才能使用

    MySQL社區(qū)版是由分散在世界各地的MySQL 開發(fā)者、愛好者一起開發(fā)與維護(hù),可以免費(fèi)使用

    兩者區(qū)別:

    • 商業(yè)版組織管理與測(cè)試環(huán)節(jié)更加嚴(yán)格,穩(wěn)定性更好
    • 商業(yè)版不遵守GPL
    • 商業(yè)版可獲得7*24小時(shí)的服務(wù),如故障維護(hù)與打補(bǔ)丁等

    MySQL產(chǎn)品陣營

    • 第一陣營:5.0-5.1陣營,可說是早期產(chǎn)品的延續(xù)

    • 第二陣營:5.4-5.7陣營,更好地整合了MySQL AB公司、社區(qū)、第三方公司開的存儲(chǔ)引擎,從而提高性能

    • 第三陣營:6.0-7.1陣營, 就是MySQL Cluster版本,為適應(yīng)新時(shí)代集群對(duì)數(shù)據(jù)庫的需求而開發(fā)

    MySQL下載網(wǎng)址:http://www.dev.mysql.com/downloads

    MySQL5.7編譯安裝

    1.安裝編譯mysql所需環(huán)境包

    [root@localhost ~]# yum -y install \
    > ncurses \
    > ncurses-devel \
    > bison \
    > cmake \
    > gcc \
    > gcc-c++
    ........//省略安裝過程

    2.添加一個(gè)mysql用戶

    [root@localhost ~]# useradd -s /sbin/nologin  mysql
    [root@localhost ~]#

    3.將mysql源碼包解壓到“/opt/”目錄下

    [root@localhost ~]# mkdir /mnt/tools
    [root@localhost ~]# mount.cifs //192.168.100.50/tools /mnt/tools/
    Password for root@//192.168.100.50/tools:  
    [root@localhost ~]# cd /mnt/tools/MySQL/
    [root@localhost MySQL]# ls
    boost_1_59_0.tar.gz  mysql-5.7.17.tar.gz
    [root@localhost MySQL]# tar zxvf mysql-5.7.17.tar.gz -C /opt/
    ............//省略解壓過程
    [root@localhost MySQL]#tar zxvf boost_1_59_0.tar.gz -C /usr/local/
    ............//省略解壓過程
    [root@localhost MySQL]#

    4.將“boost_1_59_0”目錄重命名為“boost”

    [root@localhost MySQL]# cd /usr/local/
    [root@localhost local]# mv boost_1_59_0/ boost
    [root@localhost local]# ls
    bin  boost  etc  games  include  lib  lib64  libexec  sbin  share  src
    [root@localhost local]# 

    5.配置mysql服務(wù)

    [root@localhost local]# cd /opt/mysql-5.7.17/
    [root@localhost mysql-5.7.17]# cmake \
    > -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \     //安裝路徑
    > -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \    //定義sock文件連接數(shù)據(jù)庫文件
    > -DSYSCONFDIR=/etc \    //配置文件目錄
    > -DSYSTEMD_PID_DIR=/usr/local/mysql \   //PID文件目錄
    > -DDEFAULT_CHARSET=utf8 \    //指定字符集,utf8支持中文字符
    > -DDEFAULT_COLLATION=utf8_general_ci \    指定字符集默認(rèn)
    > -DWITH_INNOBASE_STORAGE_ENGINE=1 \    存儲(chǔ)引擎
    > -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
    > -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
    > -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
    > -DMYSQL_DATADIR=/usr/local/mysql/data \     //數(shù)據(jù)庫數(shù)據(jù)文件目錄
    > -DWITH_BOOST=/usr/local/boost \     //底層運(yùn)行庫
    > -DWITH_SYSTEMD=1      //主從參數(shù)

    6.編譯安裝MySQL服務(wù)

    [root@localhost mysql-5.7.17]#make && make install
    ...........//省略編譯過程
    [root@localhost mysql-5.7.17]#

    7.更改數(shù)據(jù)庫目錄屬主、屬組

    [root@localhost mysql-5.7.17]# chown -R mysql.mysql /usr/local/mysql/
    [root@localhost mysql-5.7.17]# 

    8.修改配置文件

    [root@localhost mysql-5.7.17]# vim /etc/my.cnf
    [client]                            //客戶端
    port = 3306
    default-character-set=utf8
    socket = /usr/local/mysql/mysql.sock
    
    [mysql]                           //客戶端
    port = 3306
    default-character-set=utf8
    socket = /usr/local/mysql/mysql.sock
    
    [mysqld]                         //服務(wù)器
    user = mysql                  //用戶
    basedir = /usr/local/mysql      //設(shè)置mysql的安裝目錄
    datadir = /usr/local/mysql/data    //設(shè)置mysql數(shù)據(jù)庫的數(shù)據(jù)的存放目錄
    port = 3306                    //設(shè)置3306端口
    character_set_server=utf8           //中文字符集
    pid-file = /usr/local/mysql/mysqld.pid     //pid文件路徑
    socket = /usr/local/mysql/mysql.sock     //sock文件路徑
    server-id = 1                                     //主從參數(shù)
    
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,PIPES_AS_CONCAT,ANSI_QUOTES
    //支持模塊
    [root@localhost mysql-5.7.17]# chown mysql:mysql /etc/my.cnf  //修改文件屬主屬組
    [root@localhost mysql-5.7.17]# 

    9.將mysql相關(guān)命令添加本地環(huán)境配置中

    [root@localhost mysql-5.7.17]# echo 'PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH' >> /etc/profile
    //將MySQL寫到本地環(huán)境配置中
    [root@localhost mysql-5.7.17]#  echo 'export PATH' >> /etc/profile   //設(shè)置全局環(huán)境配置
    [root@localhost mysql-5.7.17]#  source /etc/profile    //重新加載配置文件
    [root@localhost mysql-5.7.17]# 

    10.初始化數(shù)據(jù)庫

    [root@localhost mysql-5.7.17]# cd /usr/local/mysql/
    [root@localhost mysql]# bin/mysqld \
    > --initialize-insecure \    //初始化
    > --user=mysql \   //用戶
    > --basedir=/usr/local/mysql \    //安裝目錄
    > --datadir=/usr/local/mysql/data   //數(shù)據(jù)庫數(shù)據(jù)文件目錄

    11.將MySQL服務(wù)配置文件復(fù)制到/usr/lib/systemd/system/下便于使用systemctl管理

    [root@localhost mysql]# cp usr/lib/systemd/system/mysqld.service /lib/systemd/system/
    //復(fù)制
    [root@localhost mysql]# systemctl daemon-reload   //重新加載
    [root@localhost mysql]# systemctl start mysqld.service   //啟動(dòng)服務(wù)
    [root@localhost mysql]# netstat -ntap | grep 3306    //查看tcp3306端口
    tcp6       0      0 :::3306                 :::*                    LISTEN      78684/mysqld        
    [root@localhost mysql]# systemctl enable mysqld.service    //設(shè)置開機(jī)自啟
    Created symlink from /etc/systemd/system/multi-user.target.wants/mysqld.service to /usr/lib/systemd/system/mysqld.service.
    [root@localhost mysql]# 

    12.配置MySQL密碼

    [root@localhost mysql]# mysqladmin -u root -p password
    Enter password: 
    New password: 
    Confirm new password: 
    Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
    [root@localhost mysql]#

    13.嘗試登陸MySQL數(shù)據(jù)庫

    [root@localhost mysql]# mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 4
    Server version: 5.7.17 Source distribution
    
    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> grant all privileges on *.* to 'root'@'%' identified by 'abc123' with grant option;
    //提權(quán)讓所有終端能夠遠(yuǎn)程登錄
    Query OK, 0 rows affected, 1 warning (0.00 sec)
    
    mysql> quit   //退出
    Bye
    [root@localhost mysql]# 
    
    [root@localhost mysql]# systemctl stop firewalld.service   //關(guān)閉防火墻
    [root@localhost mysql]# setenforce 0   //關(guān)閉增強(qiáng)性安全功能
    [root@localhost mysql]#

    14.用Navicat工具遠(yuǎn)程登錄

    數(shù)據(jù)庫簡介與MySQL5.7版本編譯安裝(實(shí)戰(zhàn)!)
    數(shù)據(jù)庫簡介與MySQL5.7版本編譯安裝(實(shí)戰(zhàn)?。?><br/><img src=

    15.進(jìn)入數(shù)據(jù)庫查看所有database

    [root@localhost mysql]# mysql -uroot -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 6
    Server version: 5.7.17 Source distribution
    
    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> show databases;   //查看數(shù)據(jù)庫
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    | sys                |
    +--------------------+
    4 rows in set (0.00 sec)
    
    mysql>

    網(wǎng)頁題目:數(shù)據(jù)庫簡介與MySQL5.7版本編譯安裝(實(shí)戰(zhàn)?。?/a>
    文章轉(zhuǎn)載:
    http://chinadenli.net/article18/pihpgp.html

    成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)、Google響應(yīng)式網(wǎng)站、網(wǎng)站維護(hù)、網(wǎng)頁設(shè)計(jì)公司、App開發(fā)

    廣告

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

    成都做網(wǎng)站