博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
talend 连接mysql数据库没有权限
阅读量:6708 次
发布时间:2019-06-25

本文共 2366 字,大约阅读时间需要 7 分钟。

使用talend连接一个mysql数据库,提示没有权限,最后发现mysql服务器的配置中只监听了127.0.0.1的端口,拒绝非本地的请求。通过将/etc/mysql/my.cnf中的bind_address项注释掉,/etc/init.d/mysql restart重启mysql服务器后,talend可以正常的访问该数据库:

root@ubuntu:~/extract/extract_mysql# vi /etc/mysql/my.cnf ## The MySQL database server configuration file.## You can copy this to one of:# - "/etc/mysql/my.cnf" to set global options,# - "~/.my.cnf" to set user-specific options.# # One can use all long options that the program supports.# Run program with --help to get a list of available options and with# --print-defaults to see which it would actually understand and use.## For explanations see# http://dev.mysql.com/doc/mysql/en/server-system-variables.html# This will be passed to all mysql clients# It has been reported that passwords should be enclosed with ticks/quotes# escpecially if they contain "#" chars...# Remember to edit /etc/mysql/debian.cnf when changing the socket location.[client]port            = 3306socket          = /var/run/mysqld/mysqld.sock# Here is entries for some specific programs# The following values assume you have at least 32M ram# This was formally known as [safe_mysqld]. Both versions are currently parsed.[mysqld_safe]socket          = /var/run/mysqld/mysqld.socknice            = 0[mysqld]## * Basic Settings#user            = mysqlpid-file        = /var/run/mysqld/mysqld.pidsocket          = /var/run/mysqld/mysqld.sockport            = 3306basedir         = /usrdatadir         = /var/lib/mysqltmpdir          = /tmplc-messages-dir = /usr/share/mysqlskip-external-locking## Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.#

 

使用grant all 对部署talend的机器ip赋予权限:

mysql> grant all on *.* to root@172.28.0.74 idetified by '123456';ERROR 1064 (42000): 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 'idetified by '123456'' at line 1mysql> grant all on *.* to root@172.28.0.74 idetified by '123456';ERROR 1064 (42000): 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 'idetified by '123456'' at line 1mysql> grant all on *.* to 'root'@'172.28.0.74' identified by '123456';Query OK, 0 rows affected (0.16 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)

转载地址:http://zuilo.baihongyu.com/

你可能感兴趣的文章
外包筛选心得
查看>>
Warning: skipping non-radio button in group
查看>>
Android 悬浮窗权限校验
查看>>
mysql 创建数据库 并设置utf8格式
查看>>
IDA 逆向工程 反汇编使用
查看>>
CentOS7单独安装Apache Bench压力测试工具
查看>>
python植入后门backdoor程序的方法?
查看>>
WPF 使用 Direct2D1 画图 绘制基本图形
查看>>
导入其他python文件或者python文件的函数
查看>>
80端口被NT kernel & System 占用pid 4
查看>>
Multiverse in Doctor Strange // Multiverse在《神秘博士》
查看>>
ASP.NET MVC(Razor)上运用UEditor和xhEditor编辑器检测到有潜在危险的 Request.Form的真正解决办法...
查看>>
android Fragment
查看>>
java 、Android 提交参数转码问题
查看>>
iOS UIScrollView 停止滑动 减速
查看>>
[Codility] CommonPrimeDivisors
查看>>
GIS API乱弹
查看>>
对https的理解
查看>>
七周七语言(6)
查看>>
解决delphi10.2.3 android tools闪退
查看>>