• Secure. • Compliant. • Trust at the Core. • Built for Saudi Arabia. by K® (Kenzie) SAUDI GULF HOSTiNG an Enterprise of Company Kanz AlKhaleej AlArabi, All rights Reserved.
Enterprise Knowledgebase

Creating and Managing MySQL Databases in cPanel

enterprise intelligenceintermediate

English Knowledge

Enterprise guidance

EN · LTR

Why Your Website Needs a Database

Most modern websites, including WordPress and many custom applications, store their content, settings, and user data in a database rather than in static files. MySQL is the most common database type used across cPanel hosting environments. If you have not yet read cPanel Basics: First Login Walkthrough, it covers how to reach the Databases section from your main dashboard.

Creating a New Database

Navigate to the Databases section and select MySQL Databases. Enter a name for your new database, then create it. cPanel typically prefixes your database name automatically with your account username, which helps avoid naming conflicts on shared hosting environments.

Creating a Database User

A database on its own cannot be accessed without a dedicated database user with the correct permissions. In the same MySQL Databases section, create a new database user with a strong, unique password. Once created, add this user to the database you just created, and assign it the appropriate permissions, typically All Privileges for a standard website setup.

Connecting Your Application

Most applications, including WordPress, require your database name, database username, database password, and typically a host value, most commonly localhost, entered into a configuration file during installation or setup. Keep these details recorded securely, since you will need them again if you ever need to reconnect or migrate your application.

Managing Your Database with phpMyAdmin

cPanel includes phpMyAdmin, a tool for viewing and directly editing your database's contents through a browser interface. This is useful for tasks like manually adjusting data, exporting a backup, or troubleshooting an issue your application's own interface does not expose directly. Access it through the Databases section, typically listed as phpMyAdmin.

Exporting and Importing Databases

To back up a database, open phpMyAdmin, select your database, and use the Export option, typically saving as a standard SQL file. To import a database, such as when migrating a website, select the destination database in phpMyAdmin and use the Import option, then choose your previously exported SQL file.

Common Issues

If your application cannot connect to its database, double check that the database name, username, and password entered in your application's configuration exactly match what was created in cPanel, since a small typo in any of these values is the most common cause of connection failures.

AR · RTL

المعرفة باللغة العربية السعودية

إنشاء قواعد بيانات MySQL وإدارتها في cPanel

لماذا يحتاج موقعك الإلكتروني إلى قاعدة بيانات

تخزّن معظم المواقع الإلكترونية الحديثة، بما في ذلك WordPress والعديد من التطبيقات المخصّصة، محتواها وإعداداتها وبيانات المستخدمين في قاعدة بيانات بدلًا من الملفات الثابتة. يُعد MySQL أكثر أنواع قواعد البيانات شيوعًا المستخدمة عبر بيئات استضافة cPanel. إذا لم تكن قد قرأت بعد أساسيات cPanel: شرح أول تسجيل دخول، فهو يوضّح كيفية الوصول إلى قسم قواعد البيانات من لوحة التحكم الرئيسية.

إنشاء قاعدة بيانات جديدة

انتقل إلى قسم قواعد البيانات وحدد MySQL Databases. أدخل اسمًا لقاعدة بياناتك الجديدة، ثم أنشئها. عادةً ما يضيف cPanel بادئة إلى اسم قاعدة البيانات تلقائيًا باستخدام اسم مستخدم حسابك، مما يساعد على تجنّب تعارضات التسمية في بيئات الاستضافة المشتركة.

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

لا يمكن الوصول إلى قاعدة بيانات بمفردها دون مستخدم قاعدة بيانات مخصّص يتمتع بالأذونات الصحيحة. في قسم MySQL Databases نفسه، أنشئ مستخدم قاعدة بيانات جديدًا بكلمة مرور قوية وفريدة. بعد إنشائه، أضف هذا المستخدم إلى قاعدة البيانات التي أنشأتها للتو، وامنحه الأذونات المناسبة، وعادةً ما تكون All Privileges لإعداد موقع إلكتروني قياسي.

ربط تطبيقك

تتطلب معظم التطبيقات، بما في ذلك WordPress، إدخال اسم قاعدة البيانات واسم مستخدم قاعدة البيانات وكلمة مرور قاعدة البيانات، وعادةً قيمة المضيف، وغالبًا ما تكون localhost، في ملف إعدادات أثناء التثبيت أو الإعداد. احتفظ بهذه التفاصيل مسجلة بشكل آمن، لأنك ستحتاج إليها مرة أخرى إذا احتجت يومًا إلى إعادة ربط تطبيقك أو ترحيله.

إدارة قاعدة بياناتك باستخدام phpMyAdmin

يتضمن cPanel أداة phpMyAdmin، وهي أداة لعرض محتويات قاعدة بياناتك وتحريرها مباشرةً عبر واجهة متصفح. يفيد ذلك في مهام مثل تعديل البيانات يدويًا، أو تصدير نسخة احتياطية، أو استكشاف مشكلة لا تعرضها واجهة تطبيقك نفسها مباشرةً. يمكنك الوصول إليها من خلال قسم قواعد البيانات، وعادةً ما تكون مدرجة باسم phpMyAdmin.

تصدير قواعد البيانات واستيرادها

لنسخ قاعدة بيانات احتياطيًا، افتح phpMyAdmin، وحدد قاعدة بياناتك، واستخدم خيار Export، وعادةً ما يتم الحفظ كملف SQL قياسي. لاستيراد قاعدة بيانات، مثلما يحدث عند ترحيل موقع إلكتروني، حدد قاعدة البيانات الوجهة في phpMyAdmin واستخدم خيار Import، ثم اختر ملف SQL الذي صدّرته سابقًا.

المشكلات الشائعة

إذا لم يتمكن تطبيقك من الاتصال بقاعدة بياناته، فتحقق جيدًا من أن اسم قاعدة البيانات واسم المستخدم وكلمة المرور المُدخلة في إعدادات تطبيقك تطابق تمامًا ما تم إنشاؤه في cPanel، إذ إن خطأ مطبعيًا صغيرًا في أي من هذه القيم هو السبب الأكثر شيوعًا لفشل الاتصال.

Enterprise Knowledge Centre

Frequently asked questions

Clear, accountable guidance for organizations evaluating infrastructure, security, compliance and digital transformation with K® (Kenzie) of SAUDI GULF HOSTiNG.

Clear. Accessible. Accountable.

10 results

What is a MySQL database in cPanel used for?

A MySQL database stores website content, settings, and user data for many modern websites, including WordPress and custom applications. In cPanel hosting environments, MySQL is the most common database type used for this purpose.

ما فائدة قاعدة بيانات MySQL في cPanel؟

قاعدة بيانات MySQL تخزن محتوى الموقع والإعدادات وبيانات المستخدمين لكثير من المواقع الحديثة، بما فيها WordPress والتطبيقات المخصصة. في بيئات الاستضافة التي تستخدم cPanel، تعتبر MySQL من أكثر أنواع قواعد البيانات استخدامًا لهذا الغرض.

Which websites typically need a MySQL database?

Most modern websites that store dynamic content, settings, or user data need a database. WordPress and many custom applications commonly require a MySQL database rather than relying only on static files.

ما المواقع التي تحتاج عادةً إلى قاعدة بيانات MySQL؟

معظم المواقع الحديثة التي تخزن محتوى ديناميكي أو إعدادات أو بيانات مستخدمين تحتاج إلى قاعدة بيانات. WordPress وكثير من التطبيقات المخصصة غالبًا تتطلب قاعدة بيانات MySQL بدل الاعتماد فقط على الملفات الثابتة.

What do I need before connecting an application to a MySQL database?

You need a created database, a dedicated database user, that user added to the database with appropriate permissions, and the connection details: database name, database username, database password, and usually the host value, most commonly localhost.

ما الذي أحتاجه قبل ربط تطبيق بقاعدة بيانات MySQL؟

تحتاج إلى قاعدة بيانات تم إنشاؤها، ومستخدم مخصص لقاعدة البيانات، وإضافة هذا المستخدم إلى القاعدة مع الصلاحيات المناسبة، وبيانات الاتصال: اسم قاعدة البيانات، واسم مستخدم قاعدة البيانات، وكلمة المرور، وغالبًا قيمة المضيف، والأكثر شيوعًا هي localhost.

What is the main risk when creating or editing database access details?

The main operational risk is using incorrect connection details. A small typo in the database name, username, or password is the most common cause of application database connection failures. Store the correct details securely for future reconnection or migration.

ما أبرز مخاطر إنشاء أو تعديل بيانات الوصول لقاعدة البيانات؟

أبرز خطر تشغيلي هو استخدام بيانات اتصال غير صحيحة. أي خطأ بسيط في اسم قاعدة البيانات أو اسم المستخدم أو كلمة المرور يعتبر من أكثر أسباب فشل اتصال التطبيق بقاعدة البيانات شيوعًا. احفظ البيانات الصحيحة بشكل آمن لاستخدامها لاحقًا عند إعادة الربط أو الترحيل.

How do I create a new MySQL database in cPanel?

In cPanel, go to the Databases section and select MySQL Databases. Enter a name for the new database and create it. cPanel typically adds your account username as a prefix to the database name to help avoid naming conflicts on shared hosting.

كيف أنشئ قاعدة بيانات MySQL جديدة في cPanel؟

في cPanel، انتقل إلى قسم Databases واختر MySQL Databases. أدخل اسم قاعدة البيانات الجديدة ثم أنشئها. عادةً يضيف cPanel اسم مستخدم حسابك كبادئة لاسم قاعدة البيانات للمساعدة في تجنب تعارض الأسماء في الاستضافة المشتركة.

How do I give an application permission to use the database?

Create a dedicated database user in the MySQL Databases section using a strong, unique password. Then add that user to the database and assign the appropriate permissions, typically All Privileges for a standard website setup.

كيف أعطي التطبيق صلاحية استخدام قاعدة البيانات؟

أنشئ مستخدمًا مخصصًا لقاعدة البيانات من قسم MySQL Databases باستخدام كلمة مرور قوية وفريدة. بعد ذلك أضف هذا المستخدم إلى قاعدة البيانات وحدد الصلاحيات المناسبة، وغالبًا تكون All Privileges للإعدادات القياسية للمواقع.

How can I confirm the database was exported or prepared for migration?

Open phpMyAdmin from the Databases section, select the database, and use the Export option. A typical backup is saved as a standard SQL file, which can later be imported into a destination database during migration.

كيف أتأكد أن قاعدة البيانات تم تصديرها أو تجهيزها للترحيل؟

افتح phpMyAdmin من قسم Databases، واختر قاعدة البيانات، ثم استخدم خيار Export. عادةً يتم حفظ النسخة الاحتياطية كملف SQL قياسي، ويمكن لاحقًا استيراده إلى قاعدة بيانات وجهة أثناء الترحيل.

What should I check if my application cannot connect to the database?

Check that the database name, database username, and database password in the application configuration exactly match the values created in cPanel. Even a minor typo in one of these values can prevent the connection.

ماذا أراجع إذا كان التطبيق لا يستطيع الاتصال بقاعدة البيانات؟

راجع أن اسم قاعدة البيانات واسم مستخدم قاعدة البيانات وكلمة المرور في إعدادات التطبيق تطابق تمامًا القيم التي تم إنشاؤها في cPanel. حتى الخطأ البسيط في أي قيمة منها قد يمنع الاتصال.

When should I use phpMyAdmin instead of the application interface?

Use phpMyAdmin when you need to view or directly edit database contents through the browser, export a backup, import a database, or troubleshoot an issue that your application interface does not expose directly.

متى أستخدم phpMyAdmin بدل واجهة التطبيق؟

استخدم phpMyAdmin عندما تحتاج إلى عرض محتويات قاعدة البيانات أو تعديلها مباشرة من المتصفح، أو تصدير نسخة احتياطية، أو استيراد قاعدة بيانات، أو استكشاف مشكلة لا تعرضها واجهة التطبيق بشكل مباشر.

What is the next step after creating the database and user in cPanel?

Add the database user to the database with the required permissions, then enter the database name, username, password, and usually localhost as the host value into your application’s installation or configuration file.

ما الخطوة التالية بعد إنشاء قاعدة البيانات والمستخدم في cPanel؟

أضف مستخدم قاعدة البيانات إلى قاعدة البيانات مع الصلاحيات المطلوبة، ثم أدخل اسم قاعدة البيانات واسم المستخدم وكلمة المرور وغالبًا localhost كقيمة للمضيف داخل ملف تثبيت التطبيق أو إعداداته.

Share enterprise knowledge

Share this article with your team

Help colleagues and clients discover this governed enterprise resource.

X
K® favicon

K® (Kenzie) of SAUDI GULF HOSTiNG Knowledge Base

Enterprise documentation for hosting, cloud, security, infrastructure, domains, email and operational support.

Enterprise Infrastructure

Secure hosting, cloud and managed infrastructure for Saudi Arabia, GCC and global scale.

Saudi Sovereign

Global Cloud

24/7 Support

Enterprise Security

Enterprise Consultation

Ready to build secure, sovereign-ready digital infrastructure?

Speak with K® (Kenzie) of SAUDI GULF HOSTiNG about enterprise hosting, cloud platforms, VPS, email, cybersecurity and managed infrastructure designed for Saudi Arabia, GCC and global operations.

HostingCloudVPSEmailSecurityManaged Services
KGulf Logo