建立 base 檔案時選用「連上既有資料庫」連接方式為「jdbc」,在第一行連線字串上貼上以下文字

mysql://192.168.10.100:3306/database_name?verifyServerCertificate=false&useSSL=true&requireSSL=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
把192.168.10.100:3306換成指定的位置或域名
把database_name改成資料庫名稱
使用ssl 時要用 verifyServerCertificate=false&useSSL=true&requireSSL=true
設定字元為uft8的設定,要加上 characterEncoding=utf8
當日期為0時,則會出現s1009的錯誤時,連接上要再加上 zeroDateTimeBehavior=convertToNull (src:https://blog.csdn.net/sunforraining/article/details/80055435)

第二行「JDBC驅動類別」貼上

com.mysql.jdbc.Driver

之後當然還有登入資料庫的帳戶及密碼要填。

另外將「編輯」→「資料庫」→「進階設定」→「特殊設定」頁的「以'?'取代命名的參數」打勾,存檔重開即可(src: https://ask.libreoffice.org/t/parameter-index-out-of-range-1-number-of-parameters-which-is-0/67602)。

arrow
arrow
    全站熱搜

    理群 發表在 痞客邦 留言(0) 人氣()