Hi Ian,
Well that’s a DUH moment for me. I forgot you can specify db_name.view_name. I assume you can specify db_name.table_name as well for READ, WRITE, INSERT, SELECT AND UPDATE assuming you have given Assigned Privileges for that USER to access that database. Also assuming that in TeraScript, I would specify the alternate database can under the Name in the Deployment Data Source within Data Source Selection for the Data Source action. I am also assuming that this is the “Default Database” and that if I was going to perform a JOIN that I would need to use a “Custom SQL Query” action in order to be able to designate the alternate db_name.table_name within the SQL of the custom query. Thanks for leading me in the right direction and commenting on this additional info. Steve -----Original Message----- From: Ian Evans [mailto:[email protected]] Sent: Tuesday, March 14, 2017 1:50 PM To: [email protected] Subject: Re: TeraScript-Talk: Off Topic - MySQL Steve, Perhaps create a view? For example: CREATE VIEW database1.somename AS SELECT * FROM database2.sometable; Then you can get that info using: SELECT * FROM database1.somename; -- Ian Evans Web Developer - eCommerce Team University Book Store, Inc. 4326 University Way NE Seattle, Washington 98105 206.634.3400 ext.621 [email protected]<mailto:[email protected]> On 3/14/2017 11:17 AM, Fogelson, Steve wrote: > Over the years, I have written a pretty extensive shopping cart/back > end processing application using TeraScript. The application handles > multiple web sites with a separate MySQL database for each web site. > All databases are running under one MySQL service with the One File > per Table option enabled. This option makes InnoDB to store each > created table into its own .ibd file. > > > > Each web site/database has an Inventory table. I would like to share > the Inventory table from one site with another site. I use many JOINs > and LEFT OUTER JOINs when reading the inventory table. > > > > I could look through all my tafs and tcfs for all INSERTS, UPDATES and > DELETES, add code to update each other’s table and keep the separate > Inventory tables identical, but I am looking for a better solution. > > > > I could pull the Inventory table out of the database and make the > table it’s own database that both sites access, but I am not sure if > JOINs and LEFT OUTER JOINs would work. > > > > Is there a way in MySQL to have one database look to another database > for a table instead of it’s own? > > > > Or any other strategies you might recommend? > > > > Thanks in advance > > > > Steve Fogelson > > Internet Commerce Solutions > > > > > > > > > ---------------------------------------------------------------------- > -- To unsubscribe from this list, please send an email to > [email protected]<mailto:[email protected]> > <mailto:[email protected]> with > "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected]<mailto:[email protected]> with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
