# Database and SQL

We will be using a Shared Hosting package, login to cPanel. \
(Recommened hosting - [HamzHosting](https://hamzhosting.com))

Head to the MySQL Databases in cPanel.

<figure><img src="/files/24KLH3belqiP5eyXQg6l" alt=""><figcaption></figcaption></figure>

Now, after clicking on the button you will create a new MySQL Database. You can do so by simply typing the name of your Database and hitting "Create Database".

<figure><img src="/files/ikYGwRZqS5QFiSGLdwaa" alt=""><figcaption></figcaption></figure>

Fill in the name that you want to call your database and then we will create the admin user that can access the Database, you will need this for the next few steps.

You now want to head to the bottom of the page in your MySQL Databases and "Create a user".

<figure><img src="/files/pykNGykq42o6wI0ezcU7" alt=""><figcaption></figcaption></figure>

Ensure that the password you put here is written down elsewhere and put aside for further steps.

After creating your admin user, you now want to give that user admin access to your chosen Database. On the same page, navigate "Add User To Database", you will see the "user" and the "database".&#x20;

<figure><img src="/files/77uHJwbCfaYZ7xE160CD" alt=""><figcaption></figcaption></figure>

After adding the user, you will be prompted with a Privileges page, you will want to chose the top option "All Privileges". You then want to press "Make Changes".

<figure><img src="/files/lzGCYCOvpprX0qMOeHOf" alt=""><figcaption></figcaption></figure>

Now that you have created your Database and your Admin user, you want to upload your SQL. You can head back to the main page in cPanel and find the "PHPMyAdmin" button right near your "MySQL Databases" button.

<figure><img src="/files/hK9ZQRRW4WDE9bkEUHoJ" alt=""><figcaption></figcaption></figure>

When you have logged into your PHPMyAdmin, you will see a list of Databases on the left side of your screen. You will see the Database you created, click on it. After clicking on your Database, you will see a few options at the top as shown in the picture below. You want to chose the "Import" option.

<figure><img src="/files/aQubRW5tqw5ZpxdNxmqO" alt=""><figcaption></figcaption></figure>

After clicking into "Import" you will be asked to "Choose File", You can find your SQL file provided in your downloaded product typically in it's own "SQL" folder. You will select and upload that file.

You've now completed your Database and SQL installation, please continue.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hamz.dev/hamz-panel/installation/database-and-sql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
