Bug #107990 Workbench cannot connect to server
Submitted: 27 Jul 2022 1:31 Modified: 28 Jul 2022 17:24
Reporter: Zhili Xu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.30 OS:Windows (Windows 10 Pro 21H2 19044.1826)
Assigned to: CPU Architecture:x86 (Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz 2.71 GHz)
Tags: Connect failed

[27 Jul 2022 1:31] Zhili Xu
Description:
Using workbench to connect MySQL server.
Having filled correct credentials and server information (can connect by mysql cli and sql developer).

MySQL server is installed  on Oracle Linux.

*** Server information is below ***
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.4

*** MySQL database information is below ***

Installed through DNF.

+--------------------------+-------------------------------+
| Variable_name            | Value                         |
+--------------------------+-------------------------------+
| admin_tls_version        | TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |
| immediate_server_version | 999999                        |
| innodb_version           | 8.0.26                        |
| original_server_version  | 999999                        |
| protocol_version         | 10                            |
| replica_type_conversions |                               |
| slave_type_conversions   |                               |
| tls_version              | TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |
| version                  | 8.0.26                        |
| version_comment          | Source distribution           |
| version_compile_machine  | x86_64                        |
| version_compile_os       | Linux                         |
| version_compile_zlib     | 1.2.11                        |
+--------------------------+-------------------------------+

*** Customized configuration is below ***

Added one line to my.cnf:
lower_case_table_names=1

*** Application error logged in Windows Event Viewer ***

============= 1st Error

Faulting application name: MySQLWorkbench.exe, version: 8.0.29.0, time stamp: 0x623d6be3
Faulting module name: mysql.forms.dll, version: 0.0.0.0, time stamp: 0x623d6b03
Exception code: 0xc0000005
Fault offset: 0x0000000000071580
Faulting process id: 0x2b44
Faulting application start time: 0x01d8a1518b57cf5d
Faulting application path: C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe
Faulting module path: C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysql.forms.dll
Report Id: 22930eb2-4656-45e3-aa77-f3c08a716caa
Faulting package full name: 
Faulting package-relative application ID: 

============= 2nd Error

Faulting application name: MySQLWorkbench.exe, version: 8.0.29.0, time stamp: 0x623d6be3
Faulting module name: mysql.forms.dll, version: 0.0.0.0, time stamp: 0x623d6b03
Exception code: 0xc000041d
Fault offset: 0x0000000000071580
Faulting process id: 0x2b44
Faulting application start time: 0x01d8a1518b57cf5d
Faulting application path: C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe
Faulting module path: C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysql.forms.dll
Report Id: 4bcb433a-72ec-4cc4-93b9-7a0ee6352f16
Faulting package full name: 
Faulting package-relative application ID: 

============= 3rd Error

Application: MySQLWorkbench.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at <Module>.wb.WBContextUI.request_quit(wb.WBContextUI*)
   at MySQL.Workbench.WbContext.request_quit()
   at MySQL.GUI.Workbench.MainForm.MainForm_FormClosing(System.Object, System.Windows.Forms.FormClosingEventArgs)
   at System.Windows.Forms.Form.OnFormClosing(System.Windows.Forms.FormClosingEventArgs)
   at System.Windows.Forms.Form.WmClose(System.Windows.Forms.Message ByRef)
   at MySQL.GUI.Workbench.MainForm.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

How to repeat:
(1) Prepare an Oracle linux server
(2) Install mysql-server through DNF
(3) Add customized configuration to my.cnf
(4) Initialize and start mysqld
(5) Create remote user in mysql
(6) Use workbench to connect to database on a remote pc
[27 Jul 2022 1:33] Zhili Xu
64-bit operating system, x64-based processor
[28 Jul 2022 12:12] MySQL Verification Team
Hello,

Thank you for the bug report.
It is necessary to configure lower_case_table_names to the desired setting before initializing the server. 
To enable lower_case_table_names prior to installing MySQL using APT, execute the following command: 

shell> sudo debconf-set-selections <<< "mysql-server mysql-server/lowercase-table-names select Enabled

For more details, please see here
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lower_case_tab...

Regards,
Ashwini Patil
[28 Jul 2022 12:13] MySQL Verification Team
Related to https://bugs.mysql.com/bug.php?id=90695
[28 Jul 2022 17:24] Zhili Xu
Hello Ashwini,

Thank you for your reply.

Followed your instructions, I've tried to use 'debconf-set-selections' to do something, but OS prompts 'command not found'.
Actually I used dnf (not apt) to install mysql-server, and I edited my.cnf before initializing mysql(is this right?)
And I can connect to mysql database by using mysql-cli and sql developer (I just created a schema and a user in it).

As an additional information, I've reinstalled mysql-server and initialized mysql server without adding any changes to my.cnf, the database has been initialized normally but it still can not be accessed by workbennch.
Maybe something is wrong in workbench for 64bit Windows?

Best regards!