Databases

Create a MySQL database per site under Sites → Databases → New Database.

Creating a Database

Go to Sites → Databases → New Database. Herne will:

  • Create a MySQL database with the name you enter
  • Create a dedicated MySQL user with the same name
  • Grant all privileges on that database to that user

<strong>The password is shown only once at creation — copy it immediately and paste into your .env file.</strong> — The password is generated once and shown immediately after creation. Copy it and paste it into your site&#039;s <code>.env</code> as <code>DB_PASSWORD</code>. It is not stored in the panel.

Connecting to the Database

Add the following to your site's .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_db_name
DB_USERNAME=your_db_name
DB_PASSWORD=the_password_shown_at_creation

Quick Install Credentials

WebBlocks CMS Quick Install can generate the target application database credentials for you and write them into the app .env. The generated credentials belong to the site app, not the Herne panel itself.

Herne guards against accidentally using the panel database as an application target database. Keep panel DB credentials separate from site app credentials.

Attaching an Existing Database

If the database and MySQL user already exist on the server, you can link them to the site from Sites → Databases → Attach Existing.

  • Herne reads DB_CONNECTION, DB_HOST, DB_DATABASE, and DB_USERNAME from the site's current .env file
  • Only local MySQL-style connections are accepted
  • The panel verifies that the database exists, the user exists, and that the user already has access to that database
  • This does not create or alter MySQL resources; it only links the existing database record to the site inside Herne

Changing the Password

You can change the database password at any time from the database edit page. Go to Sites → Databases → Edit and enter a new password. Herne runs ALTER USER on the MySQL server and updates the credentials.

Remember to update <code>DB_PASSWORD</code> in your <code>.env</code> file after changing the password, then run <code>php artisan config:cache</code> from the Artisan runner.

Deleting a Database

Deleting a database from the edit page drops both the MySQL database and the MySQL user. This action is irreversible.

Plan Limits

The number of databases you can create is determined by your plan (max_databases). If you reach the limit, the New Database button will show an error.