首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >UnicentaOPOS4.6.1无法连接到mysql 5.7.36

UnicentaOPOS4.6.1无法连接到mysql 5.7.36
EN

Database Administration用户
提问于 2021-11-09 20:55:47
回答 1查看 1.6K关注 0票数 1

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

mysql-服务器和Unicenta都运行在同一台机器上。

更多的信息:

代码语言:javascript
运行
复制
mysql> status
--------------
mysql  Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using  EditLine wrapper

Connection id:          19
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.36 MySQL Community Server (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 1 hour 34 min 44 sec

Threads: 1  Questions: 105  Slow queries: 0  Opens: 143  Flush tables: 1  Open tables: 136  Queries per second avg: 0.018

Unicenta设置:

错误对话框:

“错误消息”对话框中的更多信息:

代码语言:javascript
运行
复制
com.openbravo.basic.BasicException: Unable to connect to your Database Server!
    Please check User and Password credentials are correct
    The User must exist on your Database Server

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet successfully received from the server was 60 milliseconds ago. The last packet sent successfully to the server was 55 milliseconds ago.

    javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

OS info (hostnamectl):操作系统: Debian GNU/Linux 11 (斗牛眼)内核:Linux5.0-8-AMD 64体系结构: x86-64

我已经跑了

代码语言:javascript
运行
复制
GRANT ALL PRIVILEGES * . * ON 'unipos'@'localhost';

代码语言:javascript
运行
复制
FLUSH PRIVILEGES;

在mysql中创建“unipos”用户之后。

代码语言:javascript
运行
复制
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)

下面是mysql在/var/ log /mysql/error.log中的错误日志文件

代码语言:javascript
运行
复制
    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

我猜,Unicenta和mysql的版本之间存在兼容性问题,但是我找不到关于它的任何信息。值得一提的是,如果我在Unicenta设置屏幕中将用户凭据更改为“root”用户,则不会发生任何更改。

我还可以使用带有“unipos”用户凭据的mysql命令客户机连接到数据库:

代码语言:javascript
运行
复制
jr91@Luke-deb:~$ mysql -h localhost -u unipos -p MAINDB 
Enter password: 
Welcome to the MySQL monitor. 
Commands end with ; or \g. 
Your MySQL connection id is 53 Server version: 5.7.36 MySQL Community Server (GPL)

有什么想法吗?

根据我的发现,我知道Unicenta在mysql 5.7.33中工作得很好,但是Debian 11 (斗牛眼)不支持这一点,不确定这是否会导致问题.

EN

回答 1

Database Administration用户

发布于 2022-01-15 20:21:45

这是Java和MySQL之间的兼容性问题。一个临时的修复方法是编辑java.security安装的文件。您可以在第一个答案中找到解决方案在StackOverflow上

票数 0
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/302378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档