Hosting panel

Databases

What this does: the Databases tools make the databases your website keeps its information in, the users that may open them, and fast caches that make a site quicker.

When you need it: when you install WordPress or another app by hand, when an app asks for a "database name, user and password", or when you want to look inside your site's data.

A few words you will meet on this page:

Database browser

What this does: opens the database manager in a new tab, already signed in to all your databases for an hour, so you can look at and edit their tables in the browser.

When you need it: when you want to check a value in your site's data, fix a setting stored there, or import or export a table.

Where: Databases > Database browser

To open the database manager

  1. Open Databases, then Database browser.
  2. Under Open the database manager, click MySQL databases, PostgreSQL databases or MongoDB databases. The database manager opens in a new tab.
The Open the database manager box with its MySQL databases and PostgreSQL databases buttons

If something goes wrong

MySQL databases

What this does: makes MariaDB databases and users, and chooses what each user may do in each database.

When you need it: when an app or website you install by hand asks for a database.

Where: Databases > MySQL databases

Every name starts with your account's prefix: your username and an underscore, such as demo_ for the account demo. The panel shows it in front of the box, so you only type the rest. In the examples below, the database and its user are both called demo_wp: that is allowed, because databases and users have separate lists.

To make a database and its user in one go

  1. Open Databases, then MySQL databases.
  2. Under Database wizard, click Start the wizard. Nothing is made until the last step.
  3. Name the database: type a name after the prefix in Database name, such as wp. Use lowercase letters, digits and underscores.
  4. Name its user: the User name is filled in for you from the database name. Type another name if you like.
  5. Set the user's password: a strong password is made for you. Click Make a new one (the wizard's button for another strong password), or type your own of at least 12 characters.
  6. Choose what the user may do: leave Everything (all privileges) ticked. It is what most sites and apps need.
  7. Click Create database and user. You see "Your database is ready" with the Host, Port, Database, User and Password.
  8. Click Copy all details and paste them somewhere safe. Then type each one into your app's setup. When an app such as WordPress asks for the Database Host, type the Host shown, usually localhost. Click Done.
Your database is ready: demo_wp on localhost port 3306, its user demo_wp and its password, each with a Copy button

To make a database and a user separately

  1. Under Make a database, type the name in Database name, such as shop, and click Make database. You see "Database demo_shop made."
  2. Under Make a database user, type a User name, such as shopuser, and a password twice (or click Make a strong password), then click Make user.
  3. Under Give a user a database, pick the user and the database, tick the privileges (or All privileges) and click Give access. You see "demo_shopuser can now use demo_shop."

To change a user's password

  1. Under Database users, click Password beside the user.
  2. Type the new password twice, or click Make a strong password, and click Save password.
  3. Put the new password into your site's settings file too, or the site can no longer open its database.

To check and repair a database

  1. Under Your databases, click Check and repair beside it.
  2. Under What to do, choose Check first. It changes nothing.
  3. Click Run Check. Keep the page open. Tables with a problem are listed first.
  4. If a table has a problem, choose Repair and click Run Repair. Do this when your site is quiet: a table is held while it is repaired.

The choices under What to do are:

ChoiceWhat it does
CheckReads every table and reports the damaged ones. Changes nothing.
RepairTries to mend damaged tables. Some tables (of the InnoDB kind) can't be repaired and are reported as they are.
AnalyzeRefreshes the figures the database uses to answer quickly. Safe at any time.
OptimizeRebuilds each table to give back unused space. Each table is held while it is rebuilt.

To remove a database

  1. Under Your databases, click Remove beside it and confirm. You see "Database demo_shop removed. A copy is kept on the server."

To get a removed database back, ask your host.

If something goes wrong

Remote database hosts

What this does: lets your database users connect from other computers, from the addresses you list.

When you need it: when a program on your own computer, or an app on another server, must read your database directly.

Where: Databases > Remote database hosts

An IP address is the number that identifies a computer on the internet, such as 203.0.113.7. An IPv4 address is the common kind, four numbers with dots between them. You can find your own computer's address by searching the web for "what is my IP".

To allow a computer to connect

  1. Find the IP address of the computer that needs to connect.
  2. Open Databases, then Remote database hosts.
  3. In Address or range, type the IPv4 address, such as 203.0.113.7. A range such as 203.0.113.0/24 means all 256 addresses that start with 203.0.113.; use one only if your provider gives you a range.
  4. Click Allow this host. You see "203.0.113.7 may connect now."
The Hosts that may connect box with two addresses allowed: 203.0.113.7 and 198.51.100.0/24

Each database user can then also sign in from that address, with the same password and privileges. The page shows the port to connect to.

If something goes wrong

PostgreSQL databases

What this does: makes PostgreSQL databases and users, and chooses which databases each user may use.

When you need it: when an app asks for a PostgreSQL database rather than MySQL.

Where: Databases > PostgreSQL databases

This page works just like MySQL databases above, with the same Database wizard, the same prefix and the same steps. The differences:

The PostgreSQL databases page with its wizard, the database demo_app and its user demo_app_rw

To make a PostgreSQL database

  1. Open Databases, then PostgreSQL databases.
  2. Click Start the wizard and follow the four steps, as for MySQL above.
  3. Click Create database and user, then Copy all details.

If something goes wrong

MongoDB databases

What this does: makes MongoDB databases and users, and chooses which databases each user may use.

When you need it: when an app asks for a MongoDB database, or for a "MongoDB connection string".

Where: Databases > MongoDB databases

This page only shows once your host has installed MongoDB on the server. If you can't find it, ask your host.

Names start with your account's prefix, as for MySQL. There is no wizard: you make the database, then the user, then give the user the database. A user given a database may read and change everything in it, but can't open any other account's data.

The MongoDB databases page with the Make a database box, the database demo_catalog used by demo_api, and the Make a database user box

To make a MongoDB database and its user

  1. Open Databases, then MongoDB databases.
  2. Under Make a database, type a name after the prefix in Database name, such as app, and click Make database.
  3. Under Make a database user, type a User name, such as app, and a password twice (or click Make a strong password), then click Make user. Keep the password somewhere safe: your app needs it.
  4. Under Give a user a database, pick the user and the database and click Give access.
  5. In your app's setup, use host 127.0.0.1, port 27017, your database name and user name (prefix included), the password, and admin as the authentication database. As one connection string it looks like this: mongodb://demo_app:YOUR-PASSWORD@127.0.0.1:27017/demo_app?authSource=admin

MongoDB only answers apps on this server. An app on your own computer can't connect to it.

To look inside a MongoDB database

  1. Under Your databases, click Manage databases. The database manager opens in a new tab, signed in for an hour.
  2. Click your database, then a collection (MongoDB's word for a table) to see its documents.

To remove a MongoDB database

  1. Under Your databases, click Remove beside it and confirm. To stop a user using a database without removing it, click Take away.

If something goes wrong

Redis

What this does: gives your account its own Redis cache. A cache keeps answers your site works out again and again in memory, so pages load faster.

When you need it: when your site is slow, or a plugin (for example a WordPress cache plugin) asks for Redis.

Where: Databases > Redis

To turn Redis on

  1. Open Databases, then Redis.
  2. Choose the Memory. 64 MB is enough for most sites.
  3. Click Turn Redis on. You see "Redis is on. Give your site the socket below."
  4. Click Copy the socket and paste it into your site's cache settings.
Redis just turned on, with its socket to copy

A socket is a special file in your account. Your site connects to it instead of to an address and port, and needs no password. Only your own sites can use your Redis.

To change the size, use Change the memory; this restarts Redis and empties the cache. To stop it, click Turn Redis off, then Turn it off.

If something goes wrong

Memcached

What this does: gives your account its own Memcached cache, another kind of memory cache that makes sites faster.

When you need it: when an app or plugin asks for Memcached rather than Redis.

Where: Databases > Memcached

To turn Memcached on

  1. Open Databases, then Memcached.
  2. Choose the Memory. 64 MB is enough for most sites.
  3. Click Turn Memcached on. You see "Memcached is on. Give your site the socket below."
  4. Click Copy the socket and give it to your site's cache settings.
Memcached just turned on, with its socket to copy

A new memory size restarts Memcached and empties the cache. To stop it, click Turn Memcached off, then Turn it off.

If something goes wrong