magento2 – Magento 2 MySQL server no longer exists

I managed to migrate Magento 1 to the new Magento 2.2.5
When I index for the first time, I get into the indexer

Category Products

[2019-02-07 21:58:57]    main.CRITICAL: Warning: PDOStatement :: execute (): The MySQL server is in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228 {"exception" not available anymore. : "[object] (Exception (Code: 0): Warning: PDOStatement :: execute (): MySQL server is not in line 228 in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php more available in /var/www/html/vendor/magento/framework/App/ErrorHandler.php:61) "} []

mysql.conf settings are:

[mysqld]



#
# * Basic settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = / usr
datadir = / var / lib / mysql
tmpdir = / tmp
lc-messages-dir = / usr / share / mysql
Skip from the outside
#
# Instead of skipping, it is now only heard by default
# localhost is more compatible and no less secure.
bind-address = localhost
#
# * Fine tuning
#
key_buffer_size = 512M
max_allowed_packet = 1024M
thread_stack = 192K
thread_cache_size = 256
connect_timeout = 320 # default 10
table_open_cache = 4096
table_definition_cache = 4096
sort_buffer_size = 16M
max_heap_table_size = 512M
tmp_table_size = 512M
interactive_timeout = 3600
max_connections = 400
max_connect_errors = 1000000
skip_name_resolve
#skip_secure_auth
wait_timeout = 28800
innodb_buffer_pool_size = 2G
myisam_sort_buffer_size = 128M
innodb_log_file_size = 256M
innodb_thread_concurrency = 18
innodb_flush_log_at_trx_commit = 2
# This replaces the startup script and checks MyISAM tables as needed
# They are touched the first time
myisam-recover-options = BACKUP
#max_connections = 100
#table_open_cache = 64
#thread_concurrency = 10
#
# * Query cache configuration
#
query_cache_limit = 1M
query_cache_size = 64M
query_cache_type = 1

Tried to increase the limits in MySQL without success.
Suggestions please?