# Reset Root User Password

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

## Prerequisite

* มี Database Instance ใน Project ([ขั้นตอนการสร้าง SQL Database Instance](https://docs-epc.gitbook.io/ncs-documents/database-as-a-service/sql-database/create-sql-database-instance))
* Database Instance ได้ถูก Enable Root User แล้ว

## Instructions

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

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

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FZ8laZkoF3VJJ3a1vFaoh%2Fimage.png?alt=media&#x26;token=2506627a-fc4f-4fdd-9444-45ccdbf3fa62" alt=""><figcaption><p>เข้าหน้า Database Instances</p></figcaption></figure>

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

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

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FAU9eEMNuyOp3as5xdSRM%2Fimage.png?alt=media&#x26;token=f7407621-140b-43ca-a4bf-91bb98baae85" alt=""><figcaption><p>คลิกที่ชื่อของ Database Instance เพื่อเข้าหน้า Database Instance Detail </p></figcaption></figure>

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

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

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FQTnpwkXH46yTZnyVBTbY%2Fimage.png?alt=media&#x26;token=cda19752-268d-4dd0-8f30-331b7b6dd74d" alt=""><figcaption><p>เลือกคำสั่ง Reset Root User Password</p></figcaption></figure>

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

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

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FcxOzDH2q6muQ6AP6T3Ik%2Fimage.png?alt=media&#x26;token=6ce6ccd7-0f4a-4c2b-8268-dedf54e5514b" alt=""><figcaption><p>กดปุ่ม "RESET"</p></figcaption></figure>

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

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

* Username เป็น root เสมอ
* Password จะแสดงผลครั้งเดียว หลัง Reset Root User Password สำเร็จเท่านั้น หากลืมหรือต้องการเปลี่ยนแปลง Password สามารถสั่ง Reset Root User Password ใหม่ ได้

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FcqjSoMi6QkfRiOhBitW1%2Fimage.png?alt=media&#x26;token=5bb95bda-c42c-401c-98de-c98305c2a0b3" 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&#x20;

<figure><img src="https://1352697161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq2BYmWTMiaonrEL8QBP2%2Fuploads%2FYejWZ7jo8gQ1Om7EOgJr%2Fimage.png?alt=media&#x26;token=019d7e88-e568-414e-a773-40da194a3226" alt=""><figcaption><p>หลัง Reset Root User Password สำเร็จ</p></figcaption></figure>
