2.1 KiB
Database FAQ
Forgot Database Password
MySQL/MariaDB/Percona
Modify user password in panel Databases -> Users.
If you forgot the root password, you can view/reset it in Apps -> MySQL/MariaDB/Percona -> Manage.
PostgreSQL
Modify user password in panel Databases -> Users.
If you forgot the postgres user password, you can view/reset it in Apps -> PostgreSQL -> Manage.
Remote Database Connection
Only local connections are allowed by default. For remote connections:
MySQL/MariaDB/Percona:
- In Databases -> Users, create a new user with host set to
%(allow all IPs) or a specific IP - Allow database port 3306 in the firewall
PostgreSQL:
- Go to Apps -> PostgreSQL -> Manage, edit the main configuration, find
listen_addresses, uncomment it and change its value to'*' - On the same page, edit the user configuration, add a line:
host all username (IP-address/mask/all) scram-sha-256and save - Restart the PostgreSQL service
- Allow database port 5432 in the firewall
::: warning Security Warning It is not recommended to expose database ports to the public network. It is recommended to use SSH tunnels or VPN connections. :::
Connection Refused
- Check if the database service is running
- Check user permissions and host settings
- Check connection address: Use
localhostor127.0.0.1for local connections
Large File Import Failed
phpMyAdmin has upload limits. For large files, it is recommended to import via command line:
mysql -u username -p database_name < file.sql
Or upload using the panel's file manager, then execute the import in the terminal.
Database Backup
- Backup -> Create Backup, select database
- Or use command line:
# MySQL
mysqldump -u username -p database_name > backup.sql
# PostgreSQL
pg_dump -U username database_name > backup.sql
Character Set Issues
To modify character set for existing databases:
ALTER
DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;