Database
  • Introduction
  • Chapter1: MySQL
    • 1.1. MySQL在Max OSX上的筆記
      • 1.1.1.安裝My SQL (Mac OS X)
      • 1.1.2.My SQL在Mac上的一些warning message
        • 1.1.2.1.更改密碼
    • 1.2.MySQL for Beginners
      • 1.2.1.Getting the Development Environment Ready
        • 1.2.1.1.Windows console
      • 1.2.2.Beginning with MySQL Basics
        • 1.2.2.1.Creating a Database - CREATE DATABASE
        • 1.2.2.2.Creating a Table - CREATE TABLE
        • 1.2.2.3.Inserting Values into Table - INSERT INTO
        • 1.2.2.4.Retrieving Values from Table - SELECT
        • 1.2.2.5.Selecting Distinct Values from Column - DISTINCT
        • 1.2.2.6.Selecting a Specific Data using WHERE Clause
        • 1.2.2.7.Selecting with Multiple Identifiers Using AND
        • 1.2.2.8.Selecting with One of Many Identifiers Using OR
        • 1.2.2.9.Sorting the Data Using ORDER BY
        • 1.2.2.10.Limiting the Data Retrieved Using LIMIT
        • 1.2.2.11.Updating or Modifying Data in a Table Using UPDATE
        • 1.2.2.12.Deleting a Data from a Table Using DELETE
        • 1.2.2.13.Copy table
        • 1.2.2.14.Deleting a Table - DROP TABLE
        • 1.2.2.15.Deleting all values in Table - TRUNCATE TABLE
        • 1.2.2.16.Altering Table Structure - ALTER TABLE
      • 1.2.3.Time to Jump in for More
        • 1.2.3.1.Selecting Data with a Range - BETWEEN
        • 1.2.3.2.Creating Alias Name for a Column - AS
        • 1.2.3.3.Selecting Data which has one of Multitple Values - IN
        • 1.2.3.4.Using LIKE and WILDCARDS
        • 1.2.3.5.Copy Table with INSERT INTO SELECT
        • 1.2.3.6.Combine the Tables - UNION
      • 1.2.4.Few things that Keeps the Database in Shape
        • 1.2.4.1.Primary key
        • 1.2.4.2.Unique key
        • 1.2.4.3.Foreign key
        • 1.2.4.4.Default value
      • 1.2.5.Using Joins to Combine Tables
        • 1.2.5.1.Inner join
        • 1.2.5.2.Left join
        • 1.2.5.3.Right join
        • 1.2.5.4.Full join
  • Chapter2: MongoDB
  • Chapter3: SQL Server
    • 3.1.Obtain Query Execution Plan
    • 3.2.BCP
    • 3.3.SQL操作
      • 3.3.1.取代欄位, 更改欄位中的值
    • 3.4.產生create或drop database/table的script
Powered by GitBook
On this page

Was this helpful?

  1. Chapter1: MySQL
  2. 1.1. MySQL在Max OSX上的筆記

1.1.1.安裝My SQL (Mac OS X)

  • 1.先到My SQL官網, 選擇Downloads-> Community, 下載DMG Archieve

  • 2.若是沒有會員得先註冊會員, 隨後將會發出驗證信給你

  • 3.登入後繼續進行下載

  • 4.打開下載回來的.dmg檔進行安裝, 一直按確認即可,注意當安裝結束後會出現一組暫時的密碼, 將密碼記下來, 當access到My SQL時會使用到 (密碼很重要)

  • 5.確認安裝是否成功: 打開command line輸入

      cd /usr/local/mysql
      sudo ./bin/mysqld_safe
    • 接著他會停住一段時間, 按ctrl+d跳出來後再次輸入:

       bg
    • 畫面會出現:

       [1]+ sudo ./bin/mysqld_safe &
    • 再次輸入bg, 畫面會出現:

       -bash: bg: job 1 already in background
    • 表示My SQL已在在背景中run起來了

  • 6.將My SQL的路徑設到bash_profile中, 進到My SQL command:

    • 在command line中輸入:

      sudo nano ~/.bash_profile
    • 並在編輯器加入下面code:

      export PATH=/usr/local/mysql/bin:$PATH
    • 關閉並重新開一個新的command line, 輸入:

       mysql -u root -p
    • 此時要輸入的密碼就是一開始記下來的密碼,輸入後即可進到My SQL的命令列中

Previous1.1. MySQL在Max OSX上的筆記Next1.1.2.My SQL在Mac上的一些warning message

Last updated 5 years ago

Was this helpful?