溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

mysql5.6.15相關(guān)問題有哪些

發(fā)布時間:2021-12-08 09:17:24 來源:億速云 閱讀:222 作者:iii 欄目:互聯(lián)網(wǎng)科技

這篇文章主要介紹“mysql5.6.15相關(guān)問題有哪些”,在日常操作中,相信很多人在mysql5.6.15相關(guān)問題有哪些問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”mysql5.6.15相關(guān)問題有哪些”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

問題描述一: 

Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://192.168.64.11:3306/hive?characterEncoding=UTF-8, username = hive. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

錯誤原因:停止mysql服務(wù)之后修改hive密碼,之后沒有重啟mysql,雖然在主機上可以用  mysql  -uroot -p登陸,但是運行hive命令卻拒絕遠(yuǎn)程鏈接
解決方法:
   #/etc/init.d/mysql restart    #重啟mysql服務(wù)
   或service mysql restart 
     即可解決以上問題。

問題描述2:

當(dāng)在Hive中創(chuàng)建表的時候報錯:

create table years (year string, event string) row format delimited fields terminated by '\t';FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(m

字符集問題、亂碼的、顯示字符長度問題的,這是由于字符集的問題,需要配置MySQL的字符集:

mysql> alter database hive character set latin1;

 修改后問題解決。

問題描述3:

hadoop安裝完以后,經(jīng)常會提示一下警告:

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... 
using builtin-java classes where applicable

搜了好多文章,都說是跟系統(tǒng)位數(shù)有關(guān)系,我使用的是Centos 6.5 64位系統(tǒng)。

首先下載hadoop-native-64-2.6.0.tar:
http://dl.bintray.com/sequenceiq/sequenceiq-bin/hadoop-native-64-2.6.0.tar

下載完以后,解壓到hadoop的native目錄下,覆蓋原有文件即可。操作如下:

tar -xvf hadoop-native-64-2.4.0.tar -C  hadoop/lib/native/

問題描述4:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don’t support retries at the client level.)
這個是由于我的mysql不再本地(默認(rèn)使用本地數(shù)據(jù)庫),這里需要配置遠(yuǎn)端元數(shù)據(jù)服務(wù)器
<property>
  <name>hive.metastore.uris</name>
  <value>thrift://10.24.32.169:9083</value>
</property>

在后臺啟動hive服務(wù)端程序

$nohup hive --service metastore &

客戶端直接使用hive命令即可

問題描述5:

java.lang.IllegalArgumentException: java.net.UnknownHostException: dfscluster

解決辦法:

找不到hdfs集群名字dfscluster,這個文件在HADOOP的etc/hadoop下面,有個文件hdfs-site.xml,復(fù)制到hive的conf下,重啟即可

[hadoop@slave4 hadoop]$ cp  hdfs-site.xml $HIVE_HOME/conf/

問題描述6:

hive刪除表時報錯如下:
hive> drop table spider_log;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: 
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1


解決辦法:
是mysql的版本和驅(qū)動的版本不匹配導(dǎo)致的,我的mysql版本是5.6的,剛開始使用的驅(qū)動是5.1.18,
,但是mysql5.6已經(jīng)拋棄了這個參數(shù),所以會報上面錯誤,換成驅(qū)動mysql-connector-java-5.1.31-bin.jar后解決。
(注意:更高的驅(qū)動版本也不一定能行,我下載了驅(qū)動是5.1.51也不能用,必須是5.1.31)

到此,關(guān)于“mysql5.6.15相關(guān)問題有哪些”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI