Continuously getting "SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused"

hi all,

I have moved my VM from one Hypervisor to another. After that I am continuously facing this error.

SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused

This is kind like a normal error of socket and we just remove the socket and issue got fixed but this time even removing the socket and restarting the mariadb won’t help.

it fixed the issue for time being but after some time it again started.

On CLI I am getting these logs.

Firewall was unable to connect to MySQL after 30 seconds.
Check Database!

Please help me fix this permanently.

approach I used to temporarily fix the issue.

cd /var/lib/mysql/
rm -rf mysql.sock
service mariadb restart

Hi,
You have to check and repair your SQL DB. Try to run below repair command.

mysqlcheck --repair --all-databases
mysqlcheck --all-databases

Thanks

Shahin

I have already did this but of no use. check the output below;

asterisk.admin
note     : The storage engine for the table doesn't support repair
asterisk.adv_recovery_backuprestore_log
note     : The storage engine for the table doesn't support repair
asterisk.adv_recovery_heartbeat_log
note     : The storage engine for the table doesn't support repair
asterisk.adv_recovery_notifications_log
note     : The storage engine for the table doesn't support repair
asterisk.adv_recovery_primary_server_settings
note     : The storage engine for the table doesn't support repair
asterisk.adv_recovery_serviceswitch_log
note     : The storage engine for the table doesn't support repair
asterisk.ampusers
note     : The storage engine for the table doesn't support repair
asterisk.announcement
note     : The storage engine for the table doesn't support repair
asterisk.api_access_tokens
note     : The storage engine for the table doesn't support repair
asterisk.api_applications
note     : The storage engine for the table doesn't support repair
asterisk.api_asynchronous_transaction_history
note     : The storage engine for the table doesn't support repair
asterisk.api_auth_codes
note     : The storage engine for the table doesn't support repair
asterisk.api_refresh_tokens
note     : The storage engine for the table doesn't support repair
asterisk.areminder
note     : The storage engine for the table doesn't support repair
asterisk.areminder_calls
note     : The storage engine for the table doesn't support repair
asterisk.areminder_settings
note     : The storage engine for the table doesn't support repair
asterisk.areminder_updates
note     : The storage engine for the table doesn't support repair
asterisk.arimanager
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_callees
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_campaign_groups
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_campaigns
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_groups
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_log
note     : The storage engine for the table doesn't support repair
asterisk.broadcast_settings
note     : The storage engine for the table doesn't support repair
asterisk.callaccounting_cdr
note     : The storage engine for the table doesn't support repair
asterisk.callaccounting_decks_trunks
note     : The storage engine for the table doesn't support repair
asterisk.callaccounting_rate_patterns
note     : The storage engine for the table doesn't support repair
asterisk.callaccounting_ratedeck
note     : The storage engine for the table doesn't support repair
asterisk.callback
note     : The storage engine for the table doesn't support repair
asterisk.callerid_entries
note     : The storage engine for the table doesn't support repair
asterisk.calllimit
note     : The storage engine for the table doesn't support repair
asterisk.calllimit_usage
note     : The storage engine for the table doesn't support repair
asterisk.callrecording
note     : The storage engine for the table doesn't support repair
asterisk.callrecording_module
note     : The storage engine for the table doesn't support repair
asterisk.certman_cas
note     : The storage engine for the table doesn't support repair
asterisk.certman_certs
note     : The storage engine for the table doesn't support repair
asterisk.certman_csrs
note     : The storage engine for the table doesn't support repair
asterisk.certman_mapping
note     : The storage engine for the table doesn't support repair
asterisk.cidlookup
note     : The storage engine for the table doesn't support repair
asterisk.cidlookup_incoming
note     : The storage engine for the table doesn't support repair
asterisk.conferencespro
note     : The storage engine for the table doesn't support repair
asterisk.conferencespro_rooms
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_emails
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_images
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_numbers
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_speeddials
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_userman_images
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_websites
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_entry_xmpps
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_group_entries
note     : The storage engine for the table doesn't support repair
asterisk.contactmanager_groups
note     : The storage engine for the table doesn't support repair
asterisk.cron_jobs
note     : The storage engine for the table doesn't support repair
asterisk.cronmanager
note     : The storage engine for the table doesn't support repair
asterisk.custom_extensions
note     : The storage engine for the table doesn't support repair
asterisk.customcontexts_contexts
note     : The storage engine for the table doesn't support repair
asterisk.customcontexts_contexts_list
note     : The storage engine for the table doesn't support repair
asterisk.customcontexts_includes
note     : The storage engine for the table doesn't support repair
asterisk.customcontexts_includes_list
note     : The storage engine for the table doesn't support repair
asterisk.customcontexts_module
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_conference_rooms
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_email
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_managed_items
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_phone_number
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_queues
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_recording_agent
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_server
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_users
note     : The storage engine for the table doesn't support repair
asterisk.cxpanel_voicemail_agent
note     : The storage engine for the table doesn't support repair
asterisk.dahdi
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_advanced
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_advanced_modules
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_analog
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_analog_custom
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_configured_locations
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_modules
note     : The storage engine for the table doesn't support repair
asterisk.dahdi_spans
note     : The storage engine for the table doesn't support repair
asterisk.dahdichandids
note     : The storage engine for the table doesn't support repair
asterisk.daynight
note     : The storage engine for the table doesn't support repair
asterisk.devices
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_alerts
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_customapp_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_customapps
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_alerts
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_customapps
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_externallines
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_logos
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_mcpages
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_networks
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_parkapps
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_phonebooks
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_ringtones
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_device_statuses
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_devices
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_extension_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_externalline_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_externallines
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_firmware
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_firmware_packages
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_general
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_lines
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_logos
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_mcpage_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_mcpages
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_network_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_networks
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_phonebook_entries
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_phonebook_entry_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_phonebooks
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_pnac_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_pnacs
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_queues
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_ringtones
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_status_entries
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_status_settings
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_statuses
note     : The storage engine for the table doesn't support repair
asterisk.digium_phones_voicemail_translations
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_addons
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_addons_downloads
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_downloads
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_downloads_ast_versions
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_downloads_bits
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_registers
note     : The storage engine for the table doesn't support repair
asterisk.digiumaddoninstaller_system
note     : The storage engine for the table doesn't support repair
asterisk.directory_details
note     : The storage engine for the table doesn't support repair
asterisk.directory_entries
note     : The storage engine for the table doesn't support repair
asterisk.disa
note     : The storage engine for the table doesn't support repair
asterisk.dynroute
note     : The storage engine for the table doesn't support repair
asterisk.dynroute_dests
note     : The storage engine for the table doesn't support repair
asterisk.emergencydevices
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_basefiles
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_basestations
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_brand
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_buttons
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_customExt
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_customfw
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_digium_phones_general
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_ext_buttons
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_extensions
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_firmware
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_global
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_hotdesk_emergencycid_mac_mappings
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_hotdesk_emergencycids
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_ignoreMac
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_images
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_models
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_prelog
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_ringtones
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_templates
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_timezones
note     : The storage engine for the table doesn't support repair
asterisk.endpoint_xml
note     : The storage engine for the table doesn't support repair
asterisk.extensionroutes
note     : The storage engine for the table doesn't support repair
asterisk.fax_details
note     : The storage engine for the table doesn't support repair
asterisk.fax_incoming
note     : The storage engine for the table doesn't support repair
asterisk.fax_store
note     : The storage engine for the table doesn't support repair
asterisk.fax_users
note     : The storage engine for the table doesn't support repair
asterisk.faxpro_hook_core
note     : The storage engine for the table doesn't support repair
asterisk.featurecodes
note     : The storage engine for the table doesn't support repair
asterisk.findmefollow
note     : The storage engine for the table doesn't support repair
asterisk.freepbx_log
note     : The storage engine for the table doesn't support repair
asterisk.freepbx_settings
note     : The storage engine for the table doesn't support repair
asterisk.globals
note     : The storage engine for the table doesn't support repair
asterisk.hotelwakeup
note     : The storage engine for the table doesn't support repair
asterisk.hotelwakeup_calls
note     : The storage engine for the table doesn't support repair
asterisk.iax
note     : The storage engine for the table doesn't support repair
asterisk.iaxsettings
note     : The storage engine for the table doesn't support repair
asterisk.incoming
note     : The storage engine for the table doesn't support repair
asterisk.indications_zonelist
note     : The storage engine for the table doesn't support repair
asterisk.iot_login_tokens
note     : The storage engine for the table doesn't support repair
asterisk.iot_tokens
note     : The storage engine for the table doesn't support repair
asterisk.ivr_details
note     : The storage engine for the table doesn't support repair
asterisk.ivr_entries
note     : The storage engine for the table doesn't support repair
asterisk.kvblobstore
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Callrecording
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Cidlookup
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Conferences
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Contactmanager
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Core
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Customappsreg
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Dahdiconfig
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Daynight
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Dictate
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Directory
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Disa
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Endpoint
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Filestore
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Firewall
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Hotelwakeup
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Iotserver
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Ivr
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Languages
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Manager
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Miscapps
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Miscdests
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Outroutemsg
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Paging
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Pagingpro
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Pm2
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Pms
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Queues
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Queuestats
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Recording_report
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Ringgroups
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Sangomaconnect
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Sangomacrm
note     : The storage engine for the table doesn't support repair
asterisk.kvstore_FreePBX_modules_Sipstation
note     : The storage engine for the table doesn't support repair
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_interactions
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_members
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_owners
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_stream_actions
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_stream_bodies
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_stream_links
note     : The storage engine for the table doesn't support repair
asterisk.zulu_interactions_streams
note     : The storage engine for the table doesn't support repair
asterisk.zulu_login_tokens
note     : The storage engine for the table doesn't support repair
asterisk.zulu_mobile_tokens
note     : The storage engine for the table doesn't support repair
asterisk.zulu_softphones
note     : The storage engine for the table doesn't support repair
asterisk.zulu_tokens
note     : The storage engine for the table doesn't support repair
asteriskcdrdb.cdr
note     : The storage engine for the table doesn't support repair
asteriskcdrdb.cel
note     : The storage engine for the table doesn't support repair
asteriskcdrdb.queuelog
note     : The storage engine for the table doesn't support repair
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK

Pls check below link suggestions.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.