2

I am currently trying to establish a connection from one database to another on the same hostname(mysql.stud.ntnu.no) with FEDERATED, however, when the table is created(no problem), I get this errorcode beneath:

#1429 - Unable to connect to foreign data source: Access denied for user....

... being hostname and the rest.

I have checked that the mysql version is above 5.0, so it does support the FEDERATED function

Appreciate any help or tips you got on this =)

Stian Krey
  • 21
  • 1
  • 2
  • If it's on the same host, is there a reason why you aren't using `select column from db.tablename` instead of federated tables? – sreimer Mar 09 '11 at 19:47
  • I was thinking about it, since I'm building it in Codeigniter. Might be a whole lot easier.. By the way, they are on the same hostname, but the logincredentials for the two databases are different(they contain different tables) – Stian Krey Mar 09 '11 at 20:33
  • To select or join across databases, the user you are using needs access to both. – sreimer Mar 09 '11 at 20:40
  • The user indeed has the right to perform those operations, anything else I'm missing? – Stian Krey Mar 09 '11 at 20:48
  • If the same user is failing with a direct cross database query and with the federated table connection, I'm guessing it's still a permissions error. Can't really say for sure as I have limited insight into your setup (some sort of educational institute?) I would verify that the same user/password works from the command line to both databases. `mysql -h mysql.stud.ntnu.no database_name -u username -p` – sreimer Mar 09 '11 at 21:08

1 Answers1

2

I got the same error message before I executed this command on the remote (source) server:

mysqladmin flush-hosts
rantanplan
  • 422
  • 13
  • 31