попытался установить драйвер mysql jdbc ... казалось, что он установлен, но все же ... когда я запускаю инструмент схемы HIVE, он не найден
Я скачал драйвер Ubuntu 22.04 mysql-jdbc с этого сайта.
https://dev.mysql.com/downloads/connector/j/8.0.html
sudo dpkg -i mysql-connector-java_8.0.30-1ubuntu22.04_all.deb
(Reading database ... 36308 files and directories currently installed.)
Preparing to unpack mysql-connector-java_8.0.30-1ubuntu22.04_all.deb ...
Unpacking mysql-connector-java (8.0.30-1ubuntu22.04) over (8.0.30-1ubuntu22.04) ...
Setting up mysql-connector-java (8.0.30-1ubuntu22.04) ...
и все же.. когда я собираюсь использовать его через инструмент схемы HIVE...
/usr/local/metastore/bin/schematool -initSchema -dbType mysql
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/metastore/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL: jdbc:mysql://localhost/metastore?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
Failed to load driver
Underlying cause: java.lang.ClassNotFoundException : com.mysql.jdbc.Driver
Use --verbose for detailed stacktrace.
*** schemaTool failed ***
этот разъем НЕ является драйвером JDBC? Я пробовал всевозможные пакеты от apt, и они тоже не смогли установить нужный класс.
РЕДАКТИРОВАТЬ: я вручную скопировал банку в область, которую, как я знаю, инструмент схемы может ее увидеть ... и получил новую ошибку
cp mysql-connector-java-8.0.30.jar /usr/local/metastore/lib/
/usr/local/metastore/bin/schematool -initSchema -dbType mysql
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/metastore/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL: jdbc:mysql://localhost/metastore?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
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.
Failed to get schema version.
Underlying cause: com.mysql.cj.jdbc.exceptions.CommunicationsException : Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***