Choose “Save as PDF” as the destination to download this doc.

Back to the doc
Hyyat Host

How to Create a MySQL Database and User in cPanel

Website control panel ( cpanel )  ·  https://www.hyyat.com/en/knowledgebase/create-mysql-database-cpanel/

In short: In cPanel open MySQL Databases: create the database under Create New Database, add a user under MySQL Users → Add New User, then under Add User To Database choose both, click Add, tick All Privileges and click Make Changes.

Step 1: Create the database

  1. Log in to cPanel (see how to log in to cPanel).

    إنشاء قاعدة بيانات وربط إسم المستخدم بها

  2. In the Databases section, click MySQL Databases. cPanel looks slightly different between versions, but the options are the same.

    إنشاء قاعدة بيانات وربط إسم المستخدم بها

  3. Under Create New Database, type a name and click Create Database.

    Create New Database

Step 2: Create a database user

  1. On the same page, under MySQL Users → Add New User, enter a username and a strong password (letters and numbers), then click Create User.

    سنجد كلمة ( MySQL Users ) وتحتها كلمة ( Add New User )

  2. Or click Password Generator to create a strong password automatically, and save it.

    نقوم بالضغط عليPassword Generator لتوليد باسورد تلقائي واستخدمها

    How to Create a MySQL Database and User in cPanel - screenshot 1

Step 3: Assign the user to the database

  1. Under Add User To Database, choose the user and the database you just created and click Add.

    نختار إسم المستخدم وإسم القاعده الذين تم انشاءهما للتو ونضغط ( Add )

  2. Tick All Privileges, then click Make Changes.

    All Privileges

    Make Changes

    تم اعطاء الصلحيات وتم ربط المستخدم والقاعدة

Note: cPanel adds your account prefix to database and user names. When a script asks for them, use the full names, for example user_dbname.

Next: install WordPress with your new database.

Related service: cPanel shared hosting from Hyyat Host, with support that replies within 24 hours.

Related guides