Sign In
Sign In

MySQL Management

Updated on 01 October 2025

MySQL is a database management system used for storing and processing structured data. In a DBaaS environment, you get a managed database cluster without the need for manual configuration: everything is handled automatically.

When creating a cluster, you can choose the MySQL version: 8.0 or 8.4.

Creating Databases

When you create a new cluster, a database named default_db is created automatically. 

You can create additional databases:

  1. Go to the Databases section of your Hostman control panel.

  2. Click on the cluster.

  3. In the Databases tab, click Add.

D0a5a312 9792 48b9 9260 5367c8ea1aa9

  1. Provide a name for your database: 3–64 characters. Letters, numbers, and special characters are allowed.

  2. Add a description, if necessary.

  3. Click Create.

Ab9a9e55 A570 4695 B4a6 A4d0e8601b2f

Users and Privileges

In your control panel, you can manage PostgreSQL users and their privileges.

Creating Users

  1. Go to the Databases section and click on the cluster.

  2. Open the Users tab and click Add.

E4d188f2 84e5 435b 96d8 6e6dcd7279cb

  1. Set the username and password:

    • Username: 3–32 characters. Letters, numbers, and special characters are allowed.

    • Password: 8–30 characters. Letters, numbers, and special characters are allowed.

  2. (Optional) Configure the user’s privileges. You can also leave the default parameters and change them later at any time.

  3. Click Create.

Modifying Privileges

To update the privileges of an existing user:

  1. Go to the Databases section and click on the cluster.

  2. Open the Users tab.

  3. Click the three dots next to the user.

  4. Select Privileges.

0c28ea74 F1df 4911 Aa39 96ba34885a90

  1. Choose the required privileges. You can grant access to a specific database or grant the same privileges for all databases by enabling Identical for all databases in the top right.

9218d1cb 04a7 47e6 Ba18 28fc05918779

Available Privileges

Privilege

Description

USAGE

Basic privilege that allows login without access to objects.

SELECT

Read data from tables and views.

INSERT

Add new records.

UPDATE

Modify existing records.

DELETE

Remove records.

CREATE

Create new tables, indexes, and other objects.

DROP

Remove objects such as tables or databases.

REFERENCES

Use foreign keys.

INDEX

Create and drop indexes.

ALTER

Modify the structure of existing tables.

LOCK TABLES

Use manual table locking.

CREATE VIEW

Create views.

SHOW VIEW

Display the structure of existing views.

CREATE ROUTINE

Create stored procedures and functions.

ALTER ROUTINE

Modify stored procedures and functions.

EVENT

Create and manage events (EVENT SCHEDULER).

TRIGGER

Create and drop triggers.

SELECT on slow_log

Read access to the system slow query log table.

DROP on slow_log

Ability to clear the contents of the slow_log table.

Changing User Password

You can change the user password:

  1. Go to the Database section and click on the cluster.
  2. Go to the Users tab.
  3. Click the three dots next to the user.
  4. Select Change password.
  5. Enter a new value and save changes.

Database Parameters

You can change database settings to optimize its performance. 

By default, the database is created with the parameters that are suitable for most tasks and will ensure the performance of the selected configuration. However, if your project requires specific settings, you can change them as you wish. 

Be careful and change parameters only if you are sure of their purpose. Incorrect configuration can negatively affect the operation of the database and its performance.

Changing Parameters

  1. Go to the Databases section and click on the cluster.

  2. Go to the Configuration tab.

  3. Click Modify parameters next to Database parameters.

7b1d4299 2822 4464 Aed0 01c008b5f271

  1. Adjust the parameters. To read more about each parameter, click Open description next to it.

Db5f0428 Be06 4ca6 8b32 E8599e6b863c

  1. Click Apply at the bottom of the page.

Available parameters depend on the selected MySQL version.

MySQL 8.0 Parameters List

Parameter

Valid Values

Default Value

auto_increment_increment

1–65535

1

auto_increment_offset

1–65535

1

innodb_io_capacity

100–4294967295

1500

innodb_purge_threads

1–32

4

innodb_read_io_threads

1–64

4

innodb_thread_concurrency

0–1000

0

innodb_write_io_threads

1–64

4

innodb_log_file_size

4194304–274877906944

214748365

join_buffer_size

128–18446744073709551488

67108864

max_allowed_packet

1024–1073741824

16777216

max_heap_table_size

16384–18446744073709550592

16777216

max_connections

1–100000

49

sql_mode

See documentation

sort_buffer_size

32768–18446744073709551615

14680064

thread_cache_size

0–16384

128

innodb_flush_log_at_trx_commit

0–2

1

transaction_isolation

read-uncommitted

long_query_time

0–31536000

10

tmp_table_size

1024–18446744073709551615

16777216

table_open_cache

1–524288

4970

table_open_cache_instances

1–64

16

innodb_flush_method

O_DSYNC

innodb_strict_mode

On/Off

On

slow_query_log

On/Off

On

binlog_cache_size

4096–18446744073709547520

32768

binlog_group_commit_sync_delay

1–1000000

1

binlog_row_image

full

binlog_rows_query_log_events

On/Off

Off

character_set_server

utf8

explicit_defaults_for_timestamp

On/Off

On

group_concat_max_len

4–18446744073709551615

1024

innodb_adaptive_hash_index

On/Off

On

innodb_lock_wait_timeout

1–1073741824

50

innodb_numa_interleave

On/Off

Off

net_read_timeout

1–31536000

30

net_write_timeout

1–31536000

1

regexp_time_limit

0–2147483647

32

sync_binlog

0–4294967295

1

table_definition_cache

400–524288

2000

log_bin_trust_function_creators

On/Off

On

skip_name_resolve

On/Off

Off

innodb_buffer_pool_size

5242880–18446744073709551615

858993459

wait_timeout

1–31536000

28800

interactive_timeout

1–31536000

28800

default-time-zone

-13:59–+14:00

MySQL 8.4 Parameters List

Parameter

Valid Values

Default Value

auto_increment_increment

1–65535

1

auto_increment_offset

1–65535

1

innodb_io_capacity

100–4294967295

1500

innodb_purge_threads

1–32

4

innodb_read_io_threads

1–64

4

innodb_thread_concurrency

0–1000

0

innodb_write_io_threads

1–64

4

innodb_log_file_size

4194304–274877906944

214748365

join_buffer_size

128–18446744073709551488

67108864

max_allowed_packet

1024–1073741824

16777216

max_heap_table_size

16384–18446744073709550592

16777216

max_connections

1–100000

49

sql_mode

See documentation

sort_buffer_size

32768–18446744073709551615

14680064

thread_cache_size

0–16384

128

innodb_flush_log_at_trx_commit

0–2

1

transaction_isolation

read-uncommitted

long_query_time

0–31536000

10

tmp_table_size

1024–18446744073709551615

16777216

table_open_cache

1–524288

4970

table_open_cache_instances

1–64

16

innodb_flush_method

O_DSYNC

innodb_strict_mode

On/Off

On

slow_query_log

On/Off

On

binlog_cache_size

4096–18446744073709547520

32768

binlog_group_commit_sync_delay

1–1000000

1

binlog_row_image

full

binlog_rows_query_log_events

On/Off

Off

character_set_server

utf8

explicit_defaults_for_timestamp

On/Off

On

group_concat_max_len

4–18446744073709551615

1024

innodb_adaptive_hash_index

On/Off

On

innodb_lock_wait_timeout

1–1073741824

50

innodb_numa_interleave

On/Off

Off

net_read_timeout

1–31536000

30

net_write_timeout

1–31536000

1

regexp_time_limit

0–2147483647

32

sync_binlog

0–4294967295

1

table_definition_cache

400–524288

2000

log_bin_trust_function_creators

On/Off

On

skip_name_resolve

On/Off

Off

innodb_redo_log_capacity

8388608–137438953472

104857600

innodb_buffer_pool_size

5242880–18446744073709551615

858993459

wait_timeout

1–31536000

28800

interactive_timeout

1–31536000

28800

default-time-zone

-13:59–+14:00

Resetting Parameters

You can easily restore the default parameters:

  1. Go to the Databases section and click on the cluster.

  2. Go to the Configuration tab.

  3. Click Modify parameters next to Database parameters.

  4. Scroll down to the bottom of the page and click Restore default settings.

Be careful: the parameters will be reset immediately, without additional confirmation.

Connecting to the Database

You can connect to your databases using a web interface or a terminal. Connecting via a web interface is possible only if the cluster has a public IP address.

Adminer and phpMyAdmin

You can connect to the database via the built-in web interfaces: Adminer or phpMyAdmin.

  1. Go to the Databases section and click on the cluster.

  2. Дlick the Web Interface button and select the preferred option.

8c3ebf75 7bdf 4bde A390 F3d01b0ead9b

Terminal

Install the MySQL client:

  • Ubuntu:
sudo apt install mysql-client
  • Debian:
sudo apt install mariadb-client
  • Arch:
sudo pacman -S percona-server-clients
  • Fedora:
sudo dnf install mysql

There are two ways to connect to a MySQL cluster:

  • via public IP;
  • via private IP.

You can copy the connection command from:

  • the Dashboard tab;

7a9bedf7 E231 41de 9fa8 3ff8f207c71e

  • the Connection tab.

9a990da6 D164 4d38 A3d2 326cc2408ca4

If you are using MariaDB 10.10 or higher as the client, use the option --skip_ssl when connecting to the cluster.

Creating a Dump

To create a dump, run the following command:

mysqldump --set-gtid-purged=off -y -u gen_user -p'password' -h ip_dbaas default_db | gzip > default_db.sql.gz

Here:

  • --set-gtid-purged=off excludes the SET @@GLOBAL.GTID_PURGED command, which may cause errors if privileges are insufficient.

  • -y (--no-tablespaces) excludes tablespaces, preventing possible errors during dump creation.

Importing a Dump

To import a dump, run:

cat default_db.sql.gz | gzip -d | mysql -u gen_user -p'password' -h ip_dbaas default_db

This command decompresses the dump and pipes it into the MySQL client for execution.

Was this page helpful?
Updated on 01 October 2025

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support