首页 > 解决方案 > Unicenta POS 无法连接到 Debian 11 上的 mysql 5.7

问题描述

基本上我无法让 Unicenta opos 连接到 Debian 11 上全新安装的 mysql 服务器。我已经在 mysql 中设置了一个用户并授予了权限,创建了一个名为 MAINDB 的新数据库,但由于某种原因 Unicenta 无法连接……

更多信息:

    mysql> status
--------------
mysql  Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using  EditLine wrapper

Connection id:          7
Current database:       MAINDB
Current user:           root@localhost
SSL:                    Cipher in use is ECDHE-RSA-AES128-GCM-SHA256
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.36 MySQL Community Server (GPL)
Protocol version:       10
Connection:             127.0.0.1 via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 10 min 16 sec

Threads: 1  Questions: 19  Slow queries: 0  Opens: 106  Flush tables: 1  Open tables: 99  Queries per second avg: 0.030
--------------

unicenta 配置屏幕

unicenta 错误

有任何想法吗?

操作系统信息(hostnamectl):操作系统:Debian GNU/Linux 11(bullseye)内核:Linux 5.10.0-8-amd64 架构:x86-64

mysql> SHOW GRANTS FOR unipos;
ERROR 1141 (42000): There is no such grant defined for user 'unipos' on host '%'
mysql> select host from mysql.user
    -> ;
+-----------+
| host      |
+-----------+
| localhost |
| localhost |
| localhost |
| localhost |
+-----------+
4 rows in set (0.00 sec)

我也跑过

GRANT ALL PRIVILEGES * . * ON 'unipos'@'localhost';

FLUSH PRIVILEGES;

创建unipos用户后。

这是 Unicenta 返回的错误消息:

com.openbravo.basic.BasicException:无法连接到您的数据库服务器!
请检查用户密码凭据是否正确
用户必须存在于您的数据库服务器上

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

从服务器成功接收到的最后一个数据包是 60 毫秒前。最后一个成功发送到服务器的数据包是在 55 毫秒前。

javax.net.ssl.SSLHandshakeException:没有合适的协议(协议被禁用或密码套件不合适)

更新 :

这是在尝试连接 Unicenta 时来自 mysql 的错误日志文件。

    Version: '5.7.36'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
2021-11-09T16:39:31.970790Z 2 [Note] Bad handshake
2021-11-09T16:39:31.981642Z 3 [Note] Bad handshake

标签: mysqldebianunicenta

解决方案


推荐阅读