午夜国产狂喷潮在线观看|国产AⅤ精品一区二区久久|中文字幕AV中文字幕|国产看片高清在线

    MySQL中安裝樣本數(shù)據(jù)庫Sakila過程分享
    來源:易賢網(wǎng) 閱讀:1898 次 日期:2014-11-28 16:59:52
    溫馨提示:易賢網(wǎng)小編為您整理了“MySQL中安裝樣本數(shù)據(jù)庫Sakila過程分享”,方便廣大網(wǎng)友查閱!

    通常情況下對于一個全新的MySQL服務(wù)器,沒有任何數(shù)據(jù)供我們測試和使用。對此,MySQL為我們提供了一些樣本數(shù)據(jù)庫,我們可以基于這些數(shù)據(jù)庫作基本的操作以及壓力測試等等。本文描述的是安裝sakila數(shù)據(jù)庫。該數(shù)據(jù)庫需要安裝在MySQL 5.0以上的版本。以下是其描述。

    1、下載種子數(shù)據(jù)庫

    下載位置:>

    2、安裝種子數(shù)據(jù)庫sakila

    代碼如下:

    [root@localhost ~]# unzip sakila-db.zip

    Archive: sakila-db.zip

    creating: sakila-db/

    inflating: sakila-db/sakila-schema.sql

    inflating: sakila-db/sakila.mwb

    inflating: sakila-db/sakila-data.sql

    The sakila-schema.sql file contains all the CREATE statements required to create the structure of the Sakila database including tables, views, stored procedures, and triggers.

    The sakila-data.sql file contains the INSERT statements required to populate the structure created by the sakila-schema.sql file, along with definitions for triggers that must be created after the initial data load.

    The sakila.mwb file is a MySQL Workbench data model that you can open within MySQL Workbench to examine the database structure. For more information, see MySQL Workbench.

    [root@localhost ~]# ls

    anaconda-ks.cfg Desktop install.log install.log.syslog sakila-db sakila-db.zip

    [root@localhost ~]# cd sakila-db

    [root@localhost sakila-db]# ls

    sakila-data.sql sakila.mwb sakila-schema.sql

    [root@localhost sakila-db]# mysql -uroot -p <sakila-schema.sql

    Enter password:

    [root@localhost sakila-db]# mysql -uroot -p <sakila-data.sql

    Enter password:

    3、驗證安裝結(jié)果

    代碼如下:

    [root@localhost sakila-db]# mysql

    )]> show databases;

    +--------------------+

    | Database |

    +--------------------+

    | information_schema |

    | mysql |

    | performance_schema |

    | sakila |

    | scottdb |

    | tempdb |

    | test |

    +--------------------+

    7 rows in set (0.01 sec)

    )]> use sakila

    Database changed

    ]> show tables;

    +----------------------------+

    | Tables_in_sakila |

    +----------------------------+

    | actor |

    | actor_info |

    | address |

    | category |

    | city |

    | country |

    | customer |

    | customer_list |

    | film |

    | film_actor |

    | film_category |

    | film_list |

    | film_text |

    | inventory |

    | language |

    | nicer_but_slower_film_list |

    | payment |

    | rental |

    | sales_by_film_category |

    | sales_by_store |

    | staff |

    | staff_list |

    | store |

    +----------------------------+

    23 rows in set (0.00 sec)

    ]> select count(*) from customer;

    +----------+

    | count(*) |

    +----------+

    | 599 |

    +----------+

    1 row in set (0.01 sec)

    更多信息請查看IT技術(shù)專欄

    更多信息請查看數(shù)據(jù)庫
    易賢網(wǎng)手機網(wǎng)站地址:MySQL中安裝樣本數(shù)據(jù)庫Sakila過程分享
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇剩?/div>

    2025國考·省考課程試聽報名

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)