Nodea — logo

Databases

A practical guide: how to create a MySQL database on hosting, grant a user permissions, find the host address for connecting, and manage the database in phpMyAdmin.

You can create a MySQL database on Nodea hosting in a few minutes from the panel, but the database itself is only the start — you still need to grant a user permissions, know the host address for connecting, and be able to manage the database in phpMyAdmin. As a hosting company offering servers and database administration (MySQL, PostgreSQL, MongoDB), we have gathered the whole practical process here, from creating a database to the most common problems.

What is a database and why do you need one?

A MySQL database stores organized information — customer, product or order data — in tables of rows and columns.

Many applications require a MySQL database: online stores, content management systems (WordPress, Joomla) and forums. Data is arranged in tables — much like a spreadsheet, but far more efficient when many users work with it at once. MySQL is a relational database, which means it keeps information in tables linked to one another. Without a working database, an application has nowhere to store and nothing to read its content from.

How do you create a database in the panel?

You create a database with the "Create database" button in the "Databases" tab of the hosting panel. The steps:

  1. Log in to the panel and open the tile for your hosting.
  2. Go to the Databases tab and click Create database.
  3. Give the database a name, then create a user in the Users tab.
  4. Assign the user to the database and grant permissions — without this step the database exists, but the application will not be able to connect to it.

The Databases tab handles the databases themselves, while the Users tab handles the accounts that access them. Only a user you grant permissions to can access the database. This is the most frequently skipped step: a customer creates a database, skips the user–database link, and then cannot log in from the application.

How should you name the database and user?

How should you name the database? Enter the database name, user name and password — you will enter these three values in your application's configuration later.

In the Nodea panel the database and user names usually start with a prefix from your hosting account (such as your login), to which you add your own readable part — for example login_shop. The prefix appears automatically, so do not remove it from the field. Set a strong database password: at least a dozen or so characters, with upper- and lowercase letters, digits and a special character. Save the database name, user name and password somewhere safe — you will enter them in the application's configuration file, for example wp-config.php in WordPress.

Where do you find the database host address?

You find the database host address in the hosting panel under the Databases section — it is what links your application to the MySQL database.

The host is one of the four values your application needs to connect to the database. On Nodea hosting the host is usually localhost (when the application and database run on the same server) or a specific database-server address shown in the panel. The standard MySQL port is 3306. The full set of connection details is therefore: host, database name, user name, password and port. You will meet the same pattern of access details when configuring email — if you are looking for the mailbox equivalent, see our guide to the server addresses in SMTP/IMAP settings.

How do you manage a database with phpMyAdmin?

How do you manage a database with phpMyAdmin? Once logged in, you create tables, add data and make a database backup with a single click.

phpMyAdmin is a panel tool that lets you manage a database through the browser, with no command line — you can create tables, add records and run SQL queries. You log in with the database user name and password. The most common tasks are:

  1. Creating a table — select the database in the left-hand list, enter a table name and column count, then define the fields.
  2. Importing a database — the Import tab, point to a .sql file (for example from a site you are migrating) and run it.
  3. Backup (export) — select the database, open the Export tab, choose the SQL format and download the file. This is the simplest way to back up before updating an application.

A regular database export is your insurance against a failed migration or an update that corrupts data.

The most common problems when creating a database

The most common problem is an application-to-database connection error — it comes from a wrong host, user name or password.

  • "My application cannot connect to the database" — check the host, database name, user, password and port (3306). Also make sure the user has permissions to that specific database.
  • "phpMyAdmin login does not work" — use the database user name and password (not your panel credentials). If the password is wrong, reset it in the panel under the Databases section.
  • "I forgot the database password" — you cannot read the password back, but you can change it in the panel for that database user; after changing it, update it in the application's configuration file.
  • "How many databases can I create?" — the limit depends on your hosting plan and is shown in the panel under the Databases section.

If the application still will not connect despite correct details, contact Nodea technical support — we will check the user's permissions and the database-server configuration.

What is a MySQL database?

A MySQL database is an organized collection of information stored electronically in tables of rows and columns. Most applications need one — online stores, WordPress, Joomla and forums all keep their content, settings and user accounts in it.

How should I name the database and user?

In the Nodea panel the database and user names usually start with a prefix from your hosting account, to which you add your own part. Save the database name, user name and password — you will enter these three values in your application's configuration.

Where do I find the database host address?

You find the database host address in the hosting panel under the Databases section, next to the database and user names. On Nodea hosting the host is usually localhost, and the standard MySQL port is 3306.

My application cannot connect to the database — what should I check?

First verify four values: the host, database name, user name and password, plus the port (3306). Also make sure the user has been granted permissions to that specific database.

How many databases can I create?

The number of databases depends on your hosting plan — the current limit is shown in the panel under the Databases section. If you reach it, raise the limit by changing your plan or contacting Nodea technical support.