talend 连接mysql数据库没有权限

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

[email protected]:~/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)
时间: 2024-10-23 03:44:27

talend 连接mysql数据库没有权限的相关文章

【MySql】权限不足导致的无法连接到数据库以及权限的授予和撤销

[环境参数] 1.Host OS:Win7 64bit 2.Host IP:192.168.10.1 3.VM: VMware 11.1.0 4.Client OS:CentOS 6 5.Client IP:192.168.10.1 6.MySql: 5.1.73 [障碍再现]     Host is not allowed to connect to this MySql Server 当“初次”在CentOS系统上(安装在虚拟机中)安装并且简单配置完MySql服务器之后,想要在本地访问虚拟机

用MyEclipse10.0远程连接Mysql数据库服务器

说明:本文档所有的操作均在满足以下条件的情况下操作, A.远程Linux服务器已经安装好MySQL数据库 B.本地电脑可以ping通远程服务器 C.已经成功安装了Myeclipse 一.下载mysql-connector-java-3.1.14-bin.jar 这个是连接mysql数据库的驱动器. 下载地址: http://dev.mysql.com/downloads/connector/j/5.0.html 也可以到官方网站下载,网址如下:www.mysql.com 二.在Myeclipse

通过PHP连接MYSQL数据库 创建数据库 创建表

通过PHP连接MYSQL数据库  $conn = mysql_connect("localhost","root","password") or die("无法连接数据库");  mysql_select_db("table" ,$conn) or die ("找不到数据源"); 通过PHP创建MYSQL数据库 $conn = mysql_connect("localhost&

navcat无法远程连接mysql数据库解决办法

navcat无法远程连接mysql数据库,一般都是因为本地ip没有访问权限,服务器上执行下面指令即可解决 mysql -u root -p GRANT ALL PRIVILEGES ON *.* TO 'mysql数据库用户名'@'本地ip' IDENTIFIED BY 'mysql数据库密码' WITH GRANT OPTION; flush privileges;

Navicat for mysql 远程连接 mySql数据库10061、1045错误问题 (转)

远程使用Navicat for mysql 客户端软件连接 mySql数据时,连接出现 2003-Can’t connect to MySQL on ’192.168.1.2’(10061)错误时,是由于MySQL不准许远程连接. 修改方法如下: 1:在服务端MySQL文件夹下找到my.ini文件.修改bind-address=127.0.0.1 为 bind-address=0.0.0.0 (在MySQL 5的my.ini中未发现此项) 2:重新启动MySQL服务. 测试连接情况: 如果没有给

Java进阶(二十五)Java连接mysql数据库(底层实现)

Java进阶(二十五)Java连接mysql数据库(底层实现) 前言 很长时间没有系统的使用java做项目了.现在需要使用java完成一个实验,其中涉及到java连接数据库.让自己来写,记忆中已无从搜索.特将之前使用的方法做一简单的总结.也能够在底层理解一下连接数据库的具体步骤. 实现 首先需要导入相关的jar包,我使用的为:mysql-connector-java-5.1.7-bin.jar. 下面来看一下我所使用的数据库连接方法类: MysqlUtil.java package cn.edu

Windows操作系统下远程连接MySQL数据库

用Eclipse做一个后台项目,但是数据库不想放在本地电脑,于是买了一个腾讯云服务器(学生有优惠,挺便宜的),装上MySQL数据库,但是测试连接的时候,发现总是连接不是上,但是本地数据库可以连接,于是上网搜索发现,mysql 数据库默认的连接只能在本机连接,远程连接必须授权. 远程连接权限配置: 进到你的MySQL\MySQL Server 5.5\bin文件夹下(注:Windows操作系统下doc命令进入) C:\Program Files\MySQL\MySQL Server 5.5>cd

Navicat for mysql 远程连接 mySql数据库10061、1045错误

用navicat连接远程的mysql数据报错: 有朋友可能会碰到使用Navicat for mysql 远程连接 mySql数据库会提示10061.1045错误或 2003-Can't connect to MySQL on '192.168.1.2'(10061),这个原因是因为MySQL不准许远程连接. 最简单的办法是 MySQL远程配置 代码如下 复制代码 GRANT ALL PRIVILEGES ON *.* TO [email protected]'%' IDENTIFIED BY '

通过TCP/IP连接Mysql数据库

问题:mysql只能用localhost或127.0.0.1连接 解决:mysql安装完后,默认是root用户,root用户只能在服务器登录,需要分配新用户. 1.以root用户登陆mysql数据库. 2.执行一下命令分配新用户: grant all privileges on *.* to '用户名'@'IP地址' identified by '密码'; 'all privileges ':所有权限 也可以写成 select ,update等.*.* 所有库的所有表 如 databasenam