ClouderManger搭建大数据集群时ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntucmbigdata1' (111)的问题解决(图文详解)
问题详情
相关问题的场景,是在我下面的这篇博客里
Cloudera Manager安装之利用parcels方式(在线或离线)安装3或4节点集群(包含最新稳定版本或指定版本的安装)(添加服务)(Ubuntu14.04)(五)
root@ubuntucmbigdata1:~# mysql -uhive -hubuntucmbigdata1 -phive_password
ERROR (HY000): Can't connect to MySQL server on 'ubuntucmbigdata1' (111)
root@ubuntucmbigdata1:~# mysql -uhive -hlocalhost -phive_password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.5.-0ubuntu0.14.04. (Ubuntu) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit;
Bye
解决办法
若是centos系统,则是可以直接
[root@cmbigdata1 ~]# yum install mysql-connector-java
Is this ok [y/N]: y
就好了。
但是,在ubuntu系统里,
root@ubuntucmbigdata1:/home/bigdata# apt-get install libmysql-java
则会失败。
解决办法1
root@ubuntucmbigdata1:~# sudo /etc/init.d/mysql start
查看你的mysql服务启动没。
解决办法2
root@ubuntucmbigdata1:/usr/share/java# pwd
/usr/share/java
root@ubuntucmbigdata1:/usr/share/java# ls
gettext.jar java_defaults.mk java_uno.jar juh-4.2.8.jar juh.jar jurt-4.2.8.jar jurt.jar libintl.jar mysql-connector-java-5.1.28.jar mysql-connector-java.jar mysql.jar ridl-4.2.8.jar ridl.jar unoloader.jar
root@ubuntucmbigdata1:/usr/share/java# sudo cp /usr/share/java/mysql-connector-java-5.1.28.jar /var/lib/oozie
root@ubuntucmbigdata1:/usr/share/java# cd /var/lib//oozie/
root@ubuntucmbigdata1:/var/lib/oozie# ls
examples.desktop mysql-connector-java-5.1.28.jar
root@ubuntucmbigdata1:/var/lib/oozie#
sudo cp /usr/share/java/mysql-connector-java-5.1.28.jar /var/lib/oozie
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib$ pwd
/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib$ ls
avro debug hadoop-hdfs hadoop-yarn hive-hcatalog kite libImpalaUdf-retail.a libzookeeper_mt.so.2 libzookeeper_st.so mahout search sqoop zookeeper-native
bigtop-tomcat flume-ng hadoop-httpfs hbase hue libhdfs.so libzookeeper_mt.a libzookeeper_mt.so.2.0.0 libzookeeper_st.so.2 oozie sentry sqoop2
bigtop-utils hadoop hadoop-kms hbase-solr impala libhdfs.so.0.0.0 libzookeeper_mt.la libzookeeper_st.a libzookeeper_st.so.2.0.0 parquet solr whirr
crunch hadoop-0.20-mapreduce hadoop-mapreduce hive impala-shell libImpalaUdf-debug.a libzookeeper_mt.so libzookeeper_st.la llama pig spark zookeeper
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib$ cd hive
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive$ ls
bin cloudera conf lib LICENSE NOTICE scripts sentry
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive$ cd lib/
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive/lib$ ls
accumulo-core-1.6.0.jar commons-compress-1.4.1.jar hbase-client.jar hive-jdbc-1.1.0-cdh5.6.0.jar jackson-databind-2.2.2.jar metrics-jvm-3.0.2.jar
accumulo-fate-1.6.0.jar commons-configuration-1.6.jar hbase-common.jar hive-jdbc-1.1.0-cdh5.6.0-standalone.jar jackson-jaxrs-1.9.2.jar opencsv-2.3.jar
accumulo-start-1.6.0.jar commons-dbcp-1.4.jar hbase-hadoop2-compat.jar hive-jdbc.jar jackson-xc-1.9.2.jar oro-2.0.8.jar
accumulo-trace-1.6.0.jar commons-digester-1.8.jar hbase-hadoop-compat.jar hive-jdbc-standalone.jar janino-2.7.6.jar paranamer-2.3.jar
activation-1.1.jar commons-httpclient-3.0.1.jar hbase-protocol.jar hive-metastore-1.1.0-cdh5.6.0.jar jcommander-1.32.jar parquet-hadoop-bundle.jar
ant-1.9.1.jar commons-io-2.4.jar hbase-server.jar hive-metastore.jar jdo-api-3.0.1.jar pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar
ant-launcher-1.9.1.jar commons-lang-2.6.jar high-scale-lib-1.1.1.jar hive-serde-1.1.0-cdh5.6.0.jar jersey-server-1.14.jar php
antlr-2.7.7.jar commons-logging-1.1.3.jar hive-accumulo-handler-1.1.0-cdh5.6.0.jar hive-serde.jar jersey-servlet-1.14.jar plexus-utils-1.5.6.jar
antlr-runtime-3.4.jar commons-math-2.1.jar hive-accumulo-handler.jar hive-service-1.1.0-cdh5.6.0.jar jetty-all-7.6.0.v20120127.jar py
apache-curator-2.6.0.pom commons-pool-1.5.4.jar hive-ant-1.1.0-cdh5.6.0.jar hive-service.jar jetty-all-server-7.6.0.v20120127.jar regexp-1.3.jar
apache-log4j-extras-1.2.17.jar commons-vfs2-2.0.jar hive-ant.jar hive-shims-0.23-1.1.0-cdh5.6.0.jar jline-2.12.jar servlet-api-2.5.jar
asm-3.2.jar curator-client-2.6.0.jar hive-beeline-1.1.0-cdh5.6.0.jar hive-shims-0.23.jar jpam-1.1.jar snappy-java-1.0.4.1.jar
asm-commons-3.1.jar curator-framework-2.6.0.jar hive-beeline.jar hive-shims-1.1.0-cdh5.6.0.jar jsr305-3.0.0.jar ST4-4.0.4.jar
asm-tree-3.1.jar datanucleus-api-jdo-3.2.6.jar hive-cli-1.1.0-cdh5.6.0.jar hive-shims-common-1.1.0-cdh5.6.0.jar jta-1.1.jar stax-api-1.0.1.jar
avro.jar datanucleus-core-3.2.10.jar hive-cli.jar hive-shims-common.jar junit-4.11.jar stringtemplate-3.2.1.jar
bonecp-0.8.0.RELEASE.jar datanucleus-rdbms-3.2.9.jar hive-common-1.1.0-cdh5.6.0.jar hive-shims.jar libfb303-0.9.2.jar super-csv-2.2.0.jar
calcite-avatica-1.0.0-incubating.jar derby-10.11.1.1.jar hive-common.jar hive-shims-scheduler-1.1.0-cdh5.6.0.jar libthrift-0.9.2.jar tempus-fugit-1.1.jar
calcite-core-1.0.0-incubating.jar eigenbase-properties-1.1.4.jar hive-contrib-1.1.0-cdh5.6.0.jar hive-shims-scheduler.jar log4j-1.2.16.jar velocity-1.5.jar
calcite-linq4j-1.0.0-incubating.jar geronimo-annotation_1.0_spec-1.1.1.jar hive-contrib.jar hive-testutils-1.1.0-cdh5.6.0.jar logredactor-1.0.3.jar xz-1.0.jar
commons-beanutils-1.7.0.jar geronimo-jaspic_1.0_spec-1.0.jar hive-exec-1.1.0-cdh5.6.0.jar hive-testutils.jar mail-1.4.1.jar zookeeper.jar
commons-beanutils-core-1.8.0.jar geronimo-jta_1.1_spec-1.1.1.jar hive-exec.jar htrace-core.jar maven-scm-api-1.4.jar
commons-cli-1.2.jar groovy-all-2.4.4.jar hive-hbase-handler-1.1.0-cdh5.6.0.jar httpclient-4.2.5.jar maven-scm-provider-svn-commons-1.4.jar
commons-codec-1.4.jar gson-2.2.4.jar hive-hbase-handler.jar httpcore-4.2.5.jar maven-scm-provider-svnexe-1.4.jar
commons-collections-3.2.2.jar guava-14.0.1.jar hive-hwi-1.1.0-cdh5.6.0.jar jackson-annotations-2.2.2.jar metrics-core-3.0.2.jar
commons-compiler-2.7.6.jar hamcrest-core-1.1.jar hive-hwi.jar jackson-core-2.2.2.jar metrics-json-3.0.2.jar
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive/lib$ cp /usr/share/java/mysql-connector-java-5.1.28.jar .
cp: cannot create regular file ‘./mysql-connector-java-5.1.28.jar’: Permission denied
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive/lib$ sudo cp /usr/share/java/mysql-connector-java-5.1.28.jar .
[sudo] password for bigdata:
bigdata@ubuntucmbigdata1:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hive/lib$ ls
accumulo-core-1.6.0.jar commons-compress-1.4.1.jar hbase-client.jar hive-jdbc-1.1.0-cdh5.6.0.jar jackson-databind-2.2.2.jar metrics-jvm-3.0.2.jar
accumulo-fate-1.6.0.jar commons-configuration-1.6.jar hbase-common.jar hive-jdbc-1.1.0-cdh5.6.0-standalone.jar jackson-jaxrs-1.9.2.jar mysql-connector-java-5.1.28.jar
accumulo-start-1.6.0.jar commons-dbcp-1.4.jar hbase-hadoop2-compat.jar hive-jdbc.jar jackson-xc-1.9.2.jar opencsv-2.3.jar
root@ubuntucmbigdata1:~# mysql -uhive -hubuntucmbigdata1 -phive_password
ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntucmbigdata1' (111)
root@ubuntucmbigdata1:~# mysql -uhive -hlocalhost -phive_password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 58
Server version: 5.5.55-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit;
断定不是授权的问题。
#bind-address = 127.0.0.1
原文地址
原文地址:http://stackoverflow.com/questions/1420839/cant-connect-to-mysql-server-error-111
成功!
同时,大家可以关注我的个人博客:
http://www.cnblogs.com/zlslch/ 和 http://www.cnblogs.com/lchzls/
人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。
目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获
以及对应本平台的QQ群:161156071(大数据躺过的坑)
ClouderManger搭建大数据集群时ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntucmbigdata1' (111)的问题解决(图文详解)的更多相关文章
- ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)
问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111) ...
- [转]MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
问题描述: 从一台Linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.x ...
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
装了个navicat ,然后去连接mysql服务器,一直连不上,一开始以为是防火墙问题,后来防火墙都关闭, iptable服务关闭,还是不行,网上查了下:主要是因为设置了bind_address=12 ...
- 在启动MYSQL时出现问题:“ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)”
1.问题描述 在启动MYSQL时出现问题:"ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)& ...
- ERROR 2003 (HY000): Can't connect to MySQL server on 'ip address' (111)的处理办法
远程连接mysql数据库时可以使用以下指令 mysql -h 192.168.1.104 -u root -p 如果是初次安装mysql,需要将所有/etc/mysql/内的所有配置文件的bind-a ...
- mysql绿色版安装问题解决(ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061))
原来一直是使用MySQL安装版没有出现过问题,今天在安装绿色版MySQL时出现了点问题 在安装成windows服务成功后,用net start mysql 启动时提示启动成功,但当我连接mysql就报 ...
- 【linux错误解决】MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题
问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.x ...
- 解决mysql登录报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
今天在安装一个压缩包mysql-5.7.19时,碰到了一系列问题,现将这些问题罗列出来: 一. ERROR 2003 (HY000): Can't connect to MySQL server o ...
- ERROR 2003 (HY000): Can't connect to MySQL server
http://blog.csdn.net/longxibendi/article/details/6363934 一.问题的提出 /usr/local/webserver/mysql/bin/mysq ...
随机推荐
- Arduino I2C + DS1307实时时钟
主要特性 DS1307是Maxim的串行.I2C实时时钟芯片.主要特性有: 工作电压:主电源电压4.5~5.5V,电池电压2.0~3.5V 功耗:电池供电.备份模式时<500nA 接口:I2C, ...
- c# 实现点击下载功能
转自百度知道 private void DownLoad(string strName, string strPath) { string fileName = strName;//客户端保存的文件名 ...
- linux学习之路(4)
用户身份与文件权限 通过uid来区分: 管理员 UID 为 0:系统的管理员用户. 系统用户 UID 为 1-999: Linux 系统为了避免因某个服务程序出现漏洞而被黑客提 权至整台服务器,默认 ...
- MultiTrigger
MultiTrigger是多条件触发器.意为多个条件同时满足时才会触发. 用法和Trigger差不多. 但是MultiTrigger的条件是在写在自身的判断环境之中. 基本的语法是: <Mult ...
- kali linux之被动信息收集(dns信息收集,区域传输,字典爆破)
公开可获取的信息,不与目标系统产生交互,避免留下痕迹 下图来自美军方 pdf链接:http://www.fas.org/irp/doddir/army/atp2-22-9.pdf 信息收集内容(可利用 ...
- js面对对象的几种方式
1.对象的字面量 var obj = {} 2.创建实例对象 var obj = new Object(); 3.构造函数模式 function fn(){}, new fn(); ...
- win10进入安全模式的方法
https://jingyan.baidu.com/article/a3aad71ac5919bb1fa009667.html
- 搭建git服务器(临时服务器,命令行形式,针对2到5人左右,轻量)
服务端配置 ############################################################################################## ...
- CentOS中源码编译安装Nginx
1.从官网通过wget命令将Nginx源码包下载到Linux上 Nginx下载页面:http://nginx.org/en/download.html 2.在Linux上安装需要依赖的环境 yum ...
- Android HttpURLConnection的使用+Handler的原理及典型应用
1.介绍 总结:HttpURLConnection用来发送和接收数据. 2.ANR异常报错 (1)ANR(Application not response) 应用无响应, 主线程(UI线程) (2)如 ...