使用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 = 3306
socket = /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.sock
nice = 0 [mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#

使用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 1
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 1
mysql> 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)

最新文章

  1. Linux IO模型和网络编程模型
  2. Python 之WEB框架
  3. 17 网络客户端编程 - 《Python 核心编程》
  4. 【社招】来杭州吧,阿里国际UED招前端~~
  5. java常见异常集锦
  6. windows8.1 plsql连接oracle
  7. Javascript里的那些距离们
  8. codevs 3123 高精度练习之超大整数乘法
  9. HDU 5311 Hidden String (暴力)
  10. 使用C#动态生成Word文档/Excel文档的程序测试通过后,部署到IIS服务器上,不能正常使用的问题解决方案
  11. Python入门 学习笔记 (二)
  12. 50个Android开发技巧(24 处理ListView数据为空的情况)
  13. linux 安装 Chrome
  14. MySQL使用聚合函数查询
  15. 【NOIP模拟】的士碰撞(二分答案)
  16. java中的static和final关键字
  17. AngularJS进阶(二十二)实现时间选择插件
  18. 大战Java虚拟机【2】—— GC策略
  19. 用expect实现SCP/SSH自动输入密码登录
  20. MySQL行转列

热门文章

  1. Executor并发框架--线程池,ThreadToolExecutor初步
  2. java导出excel工具类
  3. java 中文及特殊字符校验
  4. redis实现简单的分布式锁
  5. django之创建第7个项目-url配置
  6. SSM框架中,配置数据库连接的问题
  7. cmd 运行(打包后的)java程序
  8. 微信小程序支付源码,后台服务端代码
  9. 移植到windows下的iconv
  10. 阿里云安装jdk,tomcat,maven,svn,git,nginx