User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,836 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,542 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:

2 connections problem

Join Date: Jul 2006
Posts: 4
Reputation: milliondollar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
milliondollar milliondollar is offline Offline
Newbie Poster

2 connections problem

  #1  
Jul 22nd, 2006
I create 2 connectionsand then try to select the current active database:
$aaa_link = mysql_connect("host1","user1","pass1") or die(mysql_error());
$bbb_link = mysql_connect("host2","user2","pass2")or die(mysql_error());
 
mysql_select_db("dbname1", $aaa_link) or die(mysql_error());

However, mysql_select_db fails with error:
Access denied for user: "user2" to database "dbname1"
What is wrong here?
http://www.milliondollarhosting.net
Cheap hosting plans with bunch of Disk Space and Data Transfer. Best solution for Game Hosting, Image Hosting, Flash Hosting and Video Hosting. Low cost domain registration and affordable Linux, PHP, MySQL web hosting.
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 7:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC