瀚高數(shù)據(jù)庫
目錄
環(huán)境
癥狀
問題原因
解決方案
環(huán)境
系統(tǒng)平臺:Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5.7
癥狀
1、執(zhí)行如下sql語句創(chuàng)建數(shù)據(jù)庫報錯。
create database printcdburn with encoding='UTF8' OWNER=printcdburn LC_COLLATE='zh_CN.UTF-8' LC_CTYPE='zh_CN.UTF-8'
問題原因
1、初始化數(shù)據(jù)庫的時候指定了參數(shù)locale、lc-collate、lc-ctype、lc-messages的值為’C’,即數(shù)據(jù)庫默認模板template1對應這些參數(shù)值都為’C’。
initdb -e sm4 -c "echo 12345678" -D /opt/HighGo4.5.7-see/data --locale='C' --lc-collate='C' --lc-ctype='C' --lc-messages='C' --encoding='UTF-8'
解決方案
1、創(chuàng)建數(shù)據(jù)庫的時候指定模板template0即可修改這些參數(shù)。文章來源:http://www.zghlxwxcb.cn/news/detail-582980.html
create database printcdburn with encoding='UTF8' OWNER=printcdburn LC_COLLATE='zh_CN.UTF-8' LC_CTYPE='zh_CN.UTF-8' TEMPLATE=template0;
文章來源地址http://www.zghlxwxcb.cn/news/detail-582980.html
到了這里,關于create database創(chuàng)建數(shù)據(jù)庫失敗的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!