Getting Started with Database

ជំពូកនេះមិនទាន់ត្រូវបានបកប្រែជាភាសាខ្មែរនៅឡើយទេ — សូមអានជាភាសាអង់គ្លេសខាងក្រោម។

Table of Contents

  1. What Database is
  2. Choosing a plan
  3. Creating a database, step by step
  4. Choosing a password
  5. Beginner Pitfalls

1. What Database is

Database is a managed database service on Cloud+. You pick an engine, a size, and a password; Cloud+ provisions and runs the server for you, so you don't install, patch, or host anything yourself. Four engines are offered:

  • MySQL
  • MongoDB
  • PostgreSQL
  • MariaDB

This chapter creates a PostgreSQL instance, but every step except the version list is identical for the other engines.

If you want the SQL itself rather than the hosting, the SQL & Relational Databases series covers it — and its setting up PostgreSQL chapter does the same job locally that this chapter does in the cloud.

2. Choosing a plan

A plan fixes the CPU, RAM, and disk size of one database server. Plans are priced per month in KHR:

PlanPrice (KHR/mo)CPURAMSizePer extra cluster (KHR/mo)
Developer40,0001 core1 GB5 GB36,000
Starter60,0001 core1 GB15 GB54,000
Basic100,0001 core2 GB25 GB90,000
Standard240,0002 cores4 GB60 GB228,000
Premium480,0004 cores8 GB120 GB456,000
Pro800,0008 cores16 GB150 GB760,000
Enterprise1,600,00012 cores64 GB200 GB1,520,000

Prices and plan lists change, so treat this table as a snapshot and confirm against the dashboard before you pay. The plans appear in a carousel; use the left and right arrows to see them all.

Each plan card also has a Cluster stepper (- / +), defaulting to 1. A cluster is one database server; the small price under the stepper is the cost per cluster, so raising the number multiplies your bill. Start with 1.

Which plan for learning? Developer or Starter is plenty for a tutorial, a side project, or a staging database. Move up when you see real load, not before.

3. Creating a database, step by step

  1. From the top menu go to Cloud → Database. With no subscription yet you see an empty state — "Looks like you don't have subscription yet! Let's CREATE one." — click CREATE.

  2. Account Verification — your Phone Number and Email must both show Verified. Click NEXT.

  3. Plans — pick a plan (previous section) and a cluster count, then click NEXT.

  4. Payment — the Order Summary shows a Sub-total and Total. A KHR / BG toggle switches the currency between Khmer Riel and Business Gold (BG). For example, the Starter plan shows as 600 BG /mo in BG. Click PAY NOW.

    Your balances (Total Khmer Riel and Business Gold) are shown in the header, and the amount is deducted from the one you chose.

  5. Database Information — fill in the instance details:

    FieldWhat to enter
    DB TypeClick MySQL, MongoDB, PostgreSQL, or MariaDB.
    NameA name for the instance (it defaults to the engine name).
    VersionPick from the dropdown (e.g. 18.4 for PostgreSQL).
    IP WhitelistsOptional — who may connect. See the next chapter.
    Back UpOptional — paid, automatic backups. See chapter 10.
    DB AdministratorFixed to root (greyed out; you can't change it).
    PasswordYour administrator password — see below.
  6. Click CREATE. Provisioning takes a moment; when it finishes your database appears on the Database page with a Running status.

4. Choosing a password

When you click into the Password field, a panel lists what it must have, ticking each rule off as you satisfy it, with a Strength meter underneath (from very weak upward):

  • at least one number
  • at least one uppercase letter
  • at least one lowercase letter
  • at least 8 characters
  • no special characters (letters and digits only)

The last rule surprises people: many databases happily take !@#, but this form rejects them. That's actually convenient later, because a password with no special characters can go straight into a connection string without URL-encoding.

Under the field, a note says: "Remember your database password. We are not responsible for it." Take it literally — save the password in a password manager now. The dashboard shows <password> as a placeholder in connection strings (next chapter), not the real value.

5. Beginner Pitfalls

  • Picking a plan by the headline price only. The cluster count multiplies the cost. Check the Order Summary total before PAY NOW.
  • Looking for a way to rename the admin user. root is fixed; only the password is yours.
  • Using ! or @ in the password. Special characters are rejected; use a longer password of letters and digits instead.
  • Losing the password. The dashboard won't show it back to you.
  • Leaving IP Whitelists unconfigured on purpose to "keep it simple". Read the next chapter first — the whitelist is your main access control.

ទិញកាហ្វេជូនខ្ញុំ

ចូលចិត្តមេរៀននេះមែនទេ? សូមពិចារណាទិញកាហ្វេជូនខ្ញុំមួយកែវ ដើម្បីគាំទ្រការបង្កើតមាតិកាឥតគិតថ្លៃបន្ថែមទៀត!