talend 串連mysql資料庫沒有許可權

來源:互聯網
上載者:User

標籤:

使用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            = 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.#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 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)

talend 串連mysql資料庫沒有許可權

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.