> For the complete documentation index, see [llms.txt](https://docs-epc.gitbook.io/ncs-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-epc.gitbook.io/ncs-documents/database-as-a-service/sql-database/manage-sql-database-root-user/enable-root-user.md).

# Enable Root User

เปิดการใช้งาน Root User ของ Database นั้น โดยระบบจะสุ่มรหัสผ่านมาให้ ซึ่งรหัสผ่านที่ได้จะเป็น Unique Password  และไม่มีการเก็บรหัสผ่านดังกล่าวใน NCS เพื่อความปลอดภัย&#x20;

{% hint style="info" %}
เมื่อเปิดการใช้าน Root User แล้ว จะไม่สามารถปิดการใช้งานได้อีก
{% endhint %}

## Prerequisite

* มี Database Instance ใน Project ([ขั้นตอนการสร้าง SQL Database Instance](/ncs-documents/database-as-a-service/sql-database/create-sql-database-instance.md))
* Database Instance ยังไม่ได้ Enable Root User

## Instructions

### 1. เข้าสู่หน้า Database Instances&#x20;

เลือกรายการ “Database Instances” ที่ Sidebar จากเมนู SQL Database

<figure><img src="/files/KU7KsRYSnTdXPAUI26Eg" alt=""><figcaption><p>เข้าหน้า Database Instances</p></figcaption></figure>

### 2. เข้าสู่หน้า Database Instance Detail&#x20;

เข้าไปที่หน้า Database Instance Detail ของ Database Instance ที่ต้องการทำคำสั่ง&#x20;

<figure><img src="/files/XByyK6dGdLyNgaU3Y8G5" alt=""><figcaption><p>คลิกที่ชื่อของ Database Instance เพื่อเข้าหน้า Database Instance Detail</p></figcaption></figure>

### 3. เลือกคำสั่ง Enable Root User

เลือกคำสั่ง Enable Root User ได้จากการ์ด Basic Detail ที่ column: Root User

<figure><img src="/files/QrDiuKQkHKCW6fCA2bCa" alt=""><figcaption><p>เลือกคำสั่ง Enable Root User</p></figcaption></figure>

### 4. ยืนยันคำสั่ง Enable Root User

กดปุ่ม "ENABLE" เพื่อยืนยันคำสั่ง

<figure><img src="/files/qF3zAyjsAVKwZsgk4ZSA" alt=""><figcaption><p>กดปุ่ม ENABLE</p></figcaption></figure>

### 5. Root User จะสามารถใช้งานได้ หลังจากทำคำสั่งสำเร็จ&#x20;

ระบบจะแสดงผล Username และ Password&#x20;

* Username เป็น root เสมอ
* Password จะแสดงผลครั้งเดียว หลัง Enable Root User สำเร็จเท่านั้น หากลืมหรือต้องการเปลี่ยนแปลง Password สามารถทำได้ด้วยคำสั่ง [Reset Root User Password](/ncs-documents/database-as-a-service/sql-database/manage-sql-database-root-user/reset-root-user-password.md)

<figure><img src="/files/MRh8dQ8AtSqODgGezZWy" alt=""><figcaption><p>ตัวอย่าง Username และ Password</p></figcaption></figure>

{% hint style="warning" %}
Root User มีสิทธิ์การเข้าถึงสูงสุด การจัดการและการเก็บรักษา Password จึงควรทำด้วยความระมัดระวัง
{% endhint %}

Root User เป็น Enabled ที่หน้า Database Instance Detail แสดง Username: root และ คำสั่ง Reset Password

<figure><img src="/files/S29G6nSB12owNGxevWn3" alt=""><figcaption><p>หลัง Enable Root User สำเร็จ</p></figcaption></figure>
