基本上,我无法让Unicenta连接到Debian 11上mysql服务器的新安装。我已经在mysql中设置了一个用户并授予了特权,创建了一个名为MAINDB的新数据库,而且由于某种原因,Unicenta无法让它连接.
mysql-服务器和Unicenta都运行在同一台机器上。
更多的信息:
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.018Unicenta设置:

错误对话框:

“错误消息”对话框中的更多信息:
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
我已经跑了
GRANT ALL PRIVILEGES * . * ON 'unipos'@'localhost';和
FLUSH PRIVILEGES;在mysql中创建“unipos”用户之后。
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中的错误日志文件
    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命令客户机连接到数据库:
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 (斗牛眼)不支持这一点,不确定这是否会导致问题.
发布于 2022-01-15 20:21:45
这是Java和MySQL之间的兼容性问题。一个临时的修复方法是编辑java.security安装的文件。您可以在第一个答案中找到解决方案在StackOverflow上。
https://dba.stackexchange.com/questions/302378
复制相似问题