Databases
Create and manage MySQL databases in hPanel on Hostinger, including phpMyAdmin access, imports and exports, password changes, and remote connections.
MySQL databases for your websites, managed from hPanel.
Create a database
Open your website dashboard.
Go to Databases → MySQL Databases.
Click Create database.
Enter a name and click Create.
A database user is created automatically.
Connect from your app
Host
localhost for PHP apps, 127.0.0.1 for Node.js apps
Port
3306
Database
Your database name
Username
Your database user
Password
Your database user's password
Drop these in wp-config.php (WordPress) or .env (Laravel, etc.).
Connect from a Node.js app
Set your database host to 127.0.0.1 rather than localhost.
PHP apps reach MySQL over a local socket, so localhost works for them. Node.js connects over TCP and resolves localhost to the IPv6 loopback address ::1, which your database user may not be granted for — so the connection is refused:
127.0.0.1 forces IPv4 and works on every account:
Store the credentials as environment variables rather than hardcoding them in your source.
Note: This is a local connection — you don't need to enable Remote MySQL to connect from an app running on the same hosting account.
phpMyAdmin
Go to Databases in hPanel.
Click phpMyAdmin next to the database.
Use it to browse tables, run SQL, and import/export data.
Change a user's password
Databases → MySQL Users.
Click Change Password on the user.
Enter and confirm.
Warning: Update the password in your app's config right after — or the app will stop connecting.
Import a database
phpMyAdmin:
Open phpMyAdmin.
Select the database in the left sidebar.
Click Import.
Select your
.sqlfile and click Go.
Large files via SSH:
Export a database
Open phpMyAdmin.
Select the database.
Click Export.
Choose Quick and format SQL, then Go.
Delete a database
Warning: This is permanent. Export a backup first.
Databases → MySQL Databases.
Click Delete on the database.
Confirm.
Remote database access
Databases are localhost-only by default. To allow remote connections:
Databases → Remote MySQL.
Enter the allowed IP and click Add.
The same page shows the hostname your client connects to — for example srv1517.hstgr.io. Remote clients use port 3306.
Last updated: August 24, 2026
Last updated
Was this helpful?