How can I create and manage MySQL databases?
How to create MySQL databases, manage users, and use phpMyAdmin in DirectAdmin.
By Yvan Watchman Updated
DirectAdmin lets you create and manage MySQL databases for applications like WordPress, Joomla, or custom scripts.
Creating a database
- Log in to DirectAdmin via the link in your welcome email, or go to my.planetnode.net, open your webhosting product, and click the login button
- Go to MySQL Management → Create new database
- Enter a database name and click Create
- Create a database user, set a password, and assign it to the database
- Grant All or specific privileges (SELECT, INSERT, etc.)
Managing users and privileges
- MySQL Management → Manage databases: edit users, passwords, and privileges
- Remove users from databases or delete databases when no longer needed
Using phpMyAdmin
- Go to MySQL Management
- Click phpMyAdmin to open it in a new tab
- Log in with your database user and that user's password
- Use phpMyAdmin to run queries, import/export, and manage tables
Good to know
In phpMyAdmin, use your database user and that user's password, not your DirectAdmin login. Forgot the password? Set a new password for the user under MySQL Management, and update it in your website's config as well.
Connection details for scripts
Use these in your application config (e.g. wp-config.php):
- Host:
localhost - Database: your database name
- User: your database user
- Password: the password you set for the user
Access from outside: Access Hosts
By default, only your website itself can reach your database. Want to connect from another computer or server? Then add that IP address as an access host:
- Go to MySQL Management and click your database
- Under Access Hosts, add the IP address that needs to connect
- Save
Only add fixed IP addresses that you know. See Can my website connect to an external database or server?
Need more database power?
For database-heavy applications or multiple large databases, a managed VPS with a control panel gives you dedicated resources and full control over MySQL configuration.
Additional resources
Did this article help you?
Related articles
My email goes to spam or is rejected: SPF, DKIM and DMARC
Does your email end up in spam or get rejected? Check SPF, DKIM and DMARC for your domain and keep the sending limit of 500 emails per day in mind.
How do I create and manage email accounts?
How to create email accounts, forwarders, autoresponders, and spam filters in DirectAdmin.
I cannot reach my website, what now?
Read here how to solve problems when your website is no longer accessible.
How do I back up and restore my website data?
How to create backups and restore website data in DirectAdmin.