Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR

cPanel Database Creation Guide

It is now very easy to create and manage a MySQL database via cPanel. In this guide, Database setup for your web projects and you will learn user authorization procedures step by step.

Databases are indispensable for dynamic web applications such as WordPress, Joomla, e-commerce sites. With this guide, you will find all the information you need and be able to manage your database easily.

4.8 (195 evaluation)
Verified User Reviews
Last Update: April 2024

fast
Installation

Create database in minutes

safe
Access

Full control with user authorization

phpMyAdmin
Entegrasyonu

Powerful management tools

Easy
Maintenance

Backup and restore

Login to cPanel

To create a database via cPanel, you must first log in to your cPanel control panel. Use the information provided to you by your hosting provider to log into cPanel.

1

Access cPanel URL

Open your web browser and https://www.siteniz.com/cpanel or https://siteniz.com:2083 Visit . In some cases, your hosting provider may give you a special URL.

2

Username and Password Entry

Enter your cPanel username and password. You should have received this information by e-mail when you purchased hosting. If you don't remember your information, contact your hosting provider.

3

Accessing cPanel Home Page

Once you log in successfully, you will see the home page of your cPanel control panel. This page contains various tools and modules for managing your server.

Hint: For security, always use strong passwords and remember to log out of your cPanel when you're done. Also, enable Two-Factor Authentication (2FA) if possible.

Creating a MySQL Database

Once you log in to cPanel, you can easily create and manage MySQL databases. Here is the step-by-step process of creating a database:

1

Accessing the Databases Section

On the cPanel home page, find the "Databases" section. In this section, click "MySQL Databases".

2

Creating a New Database

On the "MySQL Databases" page, go to the "Create New Database" section. Here you will need to choose a name for your database.

cPanel MySQL Database Creation Screen
cPanel MySQL Databases Page
3

Determining Database Name

In the Database name field, enter a name for the database you want to create. cPanel will automatically add your username as a prefix (eg: user_databasename).

Not: The database name can only contain letters, numbers, and underscore (_) characters. Spaces and special characters cannot be used.

4

Creating the Database

Create your database by clicking the "Create" button. Once this process is complete, your new database will appear in the list of available databases.

Successful!

Congratulations! Your MySQL database has been created successfully. Now you need to create a user to access this database and give this user the appropriate permissions.

Created database name: kullanici_veritabaniadi

Database Management Features

Basic management features you can use after creating a MySQL database:

Database Deletion

You can completely remove your database by selecting the "Delete" option in the list of available databases.

Quick Permission Check

You can check all permissions of your database users in the "Existing Users" section.

Database Import

You can transfer database structure and data by importing SQL files with the phpMyAdmin tool.

Database Export

To back up your database, you can export it in SQL format with the phpMyAdmin tool.

Table Management

You can create, edit and delete tables with the phpMyAdmin tool.

Database Limitations

Maximum Number of Databases:
Varies depending on your hosting package
Maximum Number of Tables:
Depends on your MySQL version and configuration
Maximum Size:
Hosting package within disk space limitation

Creating a Database User

Create a secure user account to access the database

1

Go to MySQL Users Section

On the "MySQL Databases" page in cPanel, scroll down to find the "MySQL Users" section.

MySQL Users Section
Creating MySQL Users Section
2

Setting a New Username and Password

In the "New User" section, enter a username and set a strong password. cPanel will automatically add your account name to the beginning of your username (e.g. user_databaseuser).

Strong Password Tips:

  • Must be at least 8-12 characters long
  • Must contain uppercase and lowercase letters
  • Must use numbers and special characters (!, @, #, $ etc.)
  • Predictable information (date of birth, name, etc.) should not be used

You can create a strong and secure password using the password generator. Make sure you keep your password in a safe place!

3

Create User

Create your user account by clicking the "Create User" button. Once this process is complete, your new user will appear in the list of existing users.

Important: At this stage, the user cannot access any database yet. In the next step, you will need to establish the relationship between the user and the database and set the permissions.

User Authorization

Add the user to the database and set access permissions

1

Adding the User to the Database

On the "MySQL Databases" page, go to the "Add User to Database" section.

Select the user and database you created from the drop-down menus, then click the "Add" button.

2

Setting Permission Level

The user permissions page will open. Here you can assign permissions to the user regarding what operations he can perform on the database.

Permissions include:

  • ALL PRIVILEGES: Grants all permissions (recommended)
  • SELECT: Permission to read data
  • INSERT: Permission to add new data
  • UPDATE: Permission to update existing data
  • DELETE: Data deletion permission
  • CREATE: Permission to create new tables
  • ALTER: Permission to change table structure
  • DROP: Permission to delete tables
3

Approve Permissions

After selecting the required permissions, click the "Create Permissions" button. This will assign the selected permissions to your user.

Leave Elections

Common combinations of permissions granted to the database user

Full Power Administrator

Provides full control over the database.

ALL PRIVILEGES
Usage Case: When you need full control for your own website or app.

Standard Access Developer

It cannot change the database structure, but it can process data.

SELECT
INSERT
UPDATE
DELETE
Usage Case: Standard use for web application or CMS systems.

Salt Okunur visitor

It only allows reading data, not making changes.

SELECT
Usage Case: For reporting purposes or viewing-only situations.

Congratulations! Database and User Setup Completed

Now that you have successfully created your database and user, you can continue database management with phpMyAdmin or connect your web application to the database.

Database Connection Information

Database Server:
localhost
Database Name:
user_databasename
Database User:
user_databaseuser
Password:
[Password you specified]

Database Management with phpMyAdmin

Easily manage your database with the powerful phpMyAdmin interface

phpMyAdmin Interface

Quick Access to phpMyAdmin

1

Click on the "phpMyAdmin" icon in the "Databases" section on the cPanel home page.

2

The phpMyAdmin interface will open in a new tab.

3

You can start managing your database by selecting it from the left menu.

What is phpMyAdmin?

phpMyAdmin is an open source tool for managing MySQL databases over the web. Thanks to its user-friendly interface, you can easily perform database operations without writing code.

What Can You Do with phpMyAdmin?

Creating and Editing Tables

You can create database tables, organize columns, and manage the data structure.

Running SQL Queries

You can write and run custom SQL queries and view query results.

Database Import/Export

You can transfer data in SQL or CSV format and take database backups.

User Management

You can manage database users and permissions directly from the interface.

Attention!

phpMyAdmin is a powerful tool and misuse can damage your database. Make sure to backup your database before any important operations.

Useful phpMyAdmin Tips

Database Backup

To back up your database, select your database and use the "Export" option from the top menu. You can take a full backup by exporting it in SQL format.

Database Optimization

Optimize your tables regularly with the "Optimize" and "Repair" options. This improves database performance and fixes potential problems.

Video Lecture: cPanel Database Setup

Learn the process of creating and managing a cPanel database with step-by-step visual explanation

What Will You Learn in the Video?

  • Steps to create a cPanel MySQL database
  • Creating a database user and setting a password
  • Set and authorize user permissions
  • Database management with phpMyAdmin
  • Create and configure database tables
  • Database backup and restore operations

Frequently Asked Questions About cPanel Database

Most frequently asked questions and answers about database creation and management

How many databases can I create in cPanel?

The number of databases you can create depends on the features and limitations of your hosting package. Many hosting packages offer a certain number of MySQL databases. This number typically ranges from 5 to unlimited.

On cPanel's MySQL Databases page, the total number of databases you can create and how many you're already using are usually shown at the top. If you have questions about limitations, the best approach would be to contact your hosting provider.

Are there any restrictions for the database name?

Yes, there are some restrictions when specifying a database name:

  • The database name can only contain letters, numbers, and underscores (_).
  • Spaces or special characters cannot be used.
  • cPanel automatically adds your cPanel username and an underscore to the beginning of the database name. For example, if your username is "user" and the database name is "mywebsite", the full database name is "myuser_website".
  • The total database name (including username prefix) can be a maximum of 64 characters.

Keeping these restrictions in mind, it is recommended that you use short and understandable database names.

How can I back up my database?

There are several methods to back up your database in cPanel:

  1. Using phpMyAdmin:
    • Access phpMyAdmin from cPanel.
    • Select the database you want to back up from the left menu.
    • Click "Export" from the top menu.
    • You can keep the default settings or specify custom settings.
    • Download the SQL file by clicking the "Go" button.
  2. Using cPanel Backup Tool:
    • In cPanel, go to "Backups" or "Backup Wizard".
    • You can back up only databases using the "Partial Backup" option.
    • Select the database you want to back up and click the "Backup" button.

It is important to take regular database backups so that you can restore quickly in case of data loss.

Why might granting "ALL PRIVILEGES" permissions be risky?

The "ALL PRIVILEGES" permission gives a database user full control over the database. This means that the user can perform all operations such as creating, modifying, deleting tables in the database and reading, writing, deleting data.

Potential risks of granting these permissions include:

  • Security Risk: If your application has vulnerabilities, an attacker can gain access to the database and cause serious damage to the database with full privileges.
  • Accidental Data Deletion: Users may accidentally delete tables or data, resulting in data loss.
  • Unauthorized Structural Changes: Users can change the database schema, which may affect the operation of your application.

Best practice is to grant each user only the minimum permissions they need (principle of least privilege). However, if the database is only managed by you or used by an application you trust, it may be practical to grant the "ALL PRIVILEGES" permission.

How to create a database table?

You can use the phpMyAdmin tool to create a database table:

  1. Access phpMyAdmin from cPanel.
  2. Select the database for which you want to create a table from the left menu.
  3. Click the "New" tab or use the "Create new table" form at the bottom of the page.
  4. Enter the table name and specify how many columns you want.
  5. Click the "Go" button.
  6. Specify the name, data type, length, and other properties for each column.
  7. Mark at least one column (usually the "id" column) as the primary key and enable the "AUTO_INCREMENT" option.
  8. Create the table by clicking the "Save" button.

Alternatively, you can create a table using an SQL query. To do this, click the "SQL" tab in phpMyAdmin and write your CREATE TABLE query.

I forgot my database user password, what should I do?

If you have forgotten your database user's password, you can easily reset it via cPanel:

  1. Log in to cPanel.
  2. Go to the "MySQL Databases" page.
  3. In the "Existing Users" section, click "Change Password" next to the user whose password you want to change.
  4. Enter and confirm your new password.
  5. Click the "Change Password" button.

Note that after changing the password, you must also update the configuration files of all applications that use this database user. For example, for a WordPress site you need to update the wp-config.php file, for Joomla you need to update the configuration.php file.

Reliable Hosting Solutions for Your Web Projectctctctcts

Realize your web projects with our hosting packages powered by MySQL database support. Take advantage of high performance, superior security and 7/24 technical support.

Top