mysql編譯報錯問題(mysql安裝出現報錯)

本文目錄一覽:

cmake安裝mysql編譯提示錯誤,錯誤提示如下,請大家指教,謝謝!

錯誤提示里說你的計算機上沒有一個可用的Boost庫或版本太低,MySQL需要不低於Boost 1.57.0的版本。您應該嘗試下載一個Boost,並且完成編譯。

您應該會得到上面圖片中的大部分文件,除了幾個我自己添加的輔助編譯的腳本。

完成之後請再嘗試重新編譯MySQL。

附註:編譯後生成的二進制庫保存在Boost根目錄下\stage\lib中,請根據MySQL的編譯步驟中的指示填寫在Makefile裏面或者加入環境變量(具體的我不太清楚,需要您視具體情況而定)。

使用jdbc連接mysql為什麼報錯?

當我用JDBC連接MySql數據庫時,編譯報了如下錯誤:

錯誤1:

Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

這要求我們註冊驅動時,把Class.forName(“com.mysql.jdbc.Driver”);改成 Class.forName(“com.mysql.cj.jdbc.Driver”);

當我信息滿滿的修改之後重新編譯時,再次出現了錯誤:

錯誤2:

Fri Feb 22 08:55:38 CST 2019 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

這要求我們在設置url參數時,將useSSL=false,修改後 jdbc:mysql://localhost:3306/ds3?useSSL=false

當我修改後,本以為這下應該沒問題了,沒想到,再一次出現了問題

錯誤3:

Exception in thread “main” java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

這要求我們修改時區,修改成jdbc:mysql://localhost:3306/ds3?useSSL=falseserverTimezone=UTC

終於,不在報錯誤了。

錯誤4:當我們配置xml文件時,要把轉為其本身的轉義字符

配置properties文件的urlurl=jdbc:mysql:///ds3?useSSL=falseserverTimezone=UTC配置xml文件的urlproperty name=”url”jdbc:mysql://localhost:3306/ds3?useSSL=falseserverTimezone=UTC/property

Mysql5.5.30使用Cmake編譯不通過,報出如下錯誤:

出現該錯誤的原因是下載的MySQL版本不對。如果是源碼來安裝,需按照如下方式下載!

#1.登錄MySQL官網,並找到社區版下載地址

#2.選擇平台時,選擇Source Code

#3.然後找到符合自己操作系統版本的MySQL,下載即可;

原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-hk/n/309315.html

(0)
打賞 微信掃一掃 微信掃一掃 支付寶掃一掃 支付寶掃一掃
小藍的頭像小藍
上一篇 2025-01-04 19:30
下一篇 2025-01-04 19:30

相關推薦

發表回復

登錄後才能評論