Database Management#
The Databases page gives you complete control over your MySQL databases. You can create new databases, manage existing ones, modify user credentials, import/export data, and access phpMyAdmin — all from a single interface.
Database Overview#
When you open the Databases page, you’ll see all databases on your server displayed in a clean table. Each database entry shows:
- Database Name — The MySQL database name
- Username — The database user with access
- Linked Websites — Which websites use this database
- Size — Current database size on disk
- Actions — Quick action buttons for common operations
Creating a New Database#
Follow these steps to create a new MySQL database:
- Navigate to Databases from the sidebar
- Click the “Create Database” button
- Fill in the required fields:
- Database Name — Choose a descriptive name (e.g.,
mysite_production). Names can contain letters, numbers, and underscores - Database User — Create a new username or select an existing user
- Password — Set a strong password for the database user. Use a mix of uppercase, lowercase, numbers, and special characters
- Database Name — Choose a descriptive name (e.g.,
- Click “Create”
The database and user are created instantly. You’ll see the new database appear in the list with its credentials ready for use.
???? Tip: Keep a record of your database credentials in a secure password manager. While you can view passwords from the panel, it’s good practice to have a backup.
Database Actions#
Each database in the list has several quick action buttons:
View Password — Shows the stored database password in a popup. Useful when you need to update configuration files or share credentials securely.
Change Password — Update the database user’s password. After changing, make sure to update the password in your application’s configuration file (e.g., wp-config.php for WordPress, .env for Laravel).
Export Database — Download a compressed SQL dump (.sql.gz) of the entire database. This is useful for:
- Creating local backups
- Migrating a database to another server
- Sharing database structures with team members
Import Database — Upload a SQL file to import data into the database. Supports both plain .sql and compressed .sql.gz files. Useful for:
- Restoring from a backup
- Migrating websites between servers
- Loading development data
phpMyAdmin — Opens phpMyAdmin in a new tab with automatic authentication. phpMyAdmin provides a full SQL interface where you can browse tables, run queries, export specific tables, and manage database structure.
Delete Database — Permanently drops the database from MySQL. This action cannot be undone — make sure you have an export/backup before deleting.
Tracked Databases#
HostsNix automatically discovers all MySQL databases on your server, even those created manually via command line or phpMyAdmin. These “tracked” databases appear in your list, giving you complete visibility into your server’s database inventory.
This is particularly useful if you’ve migrated from another hosting provider or have legacy databases that weren’t created through the panel.
Linking Databases to Websites#
You can link databases to specific websites for better organization. This doesn’t affect functionality — it simply provides a visual reference of which databases belong to which websites, making it easier to manage complex setups with multiple sites.
Connection Details#
When connecting to your database from your application, use these settings:
- Host:
localhost(or127.0.0.1) - Port:
3306(default MySQL port) - Database: Your database name
- Username: Your database username
- Password: Your database password
For WordPress sites, update wp-config.php. For Laravel, update the .env file with DB_HOST, DB_DATABASE, DB_USERNAME, and DB_PASSWORD.