Why You Need a Database

Most web applications (WordPress, Laravel, custom PHP apps) require a MySQL database to store content, users, settings, and other data. Creating a database is one of the first steps when setting up a new application.

Creating a Database in EGPNL

1

Log in to EGPNL

Access your control panel at egpnl.egphp.com using your credentials.

2

Navigate to Databases

Click on Databases in the sidebar menu, then select MySQL Databases.

3

Create New Database

Click Create Database or Add Database. Enter a name for your database (letters, numbers, and underscores only).

4

Create Database User

After creating the database, create a user with a strong password. This user will connect to the database.

5

Assign User to Database

Link the user to the database and grant permissions. Select All Privileges for full access.

6

Save Your Credentials

Note down: Database name, Username, Password, and Host (usually localhost).

Naming Convention: Use descriptive names like mysite_wordpress or app_production to easily identify databases.

Database Connection Settings

Use these settings in your application's configuration:

Database Host: localhost
Database Name: your_database_name
Database User: your_username
Database Password: your_password
Database Port: 3306

WordPress wp-config.php Example

define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_username');
define('DB_PASSWORD', 'your_password');
define('DB_HOST', 'localhost');

Laravel .env Example

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password

Database Privileges

When assigning user privileges, you can choose:

  • All Privileges: Full access - recommended for application databases
  • Read Only: SELECT only - for reporting or backup users
  • Custom: Specific permissions like INSERT, UPDATE, DELETE
Security: Never use the root database user for applications. Always create dedicated users with only the permissions needed.

Managing Databases

View Databases

All your databases are listed in the MySQL Databases section of EGPNL with size and user information.

Delete a Database

  1. Go to MySQL Databases in EGPNL
  2. Find the database you want to delete
  3. Click Delete
  4. Confirm the deletion
Warning: Deleting a database permanently removes all its data. Always create a backup before deleting!

Common Issues

Access Denied Error

  • Verify username and password are correct
  • Ensure the user is assigned to the database
  • Check that privileges are granted

Database Not Found

  • Confirm the exact database name (case-sensitive)
  • Check if the database was created successfully