L8.6 MySQL db moved to standalone server not being recognized properly

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

L8.6 MySQL db moved to standalone server not being recognized properly

Tom Fortis
Hello Lasso folks!

My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have set up a MySQL server-only on a new mac mini running Yosemite and MySQL 5.6.20. My desire is to move the MySQL databases from the Lion server to the new Yosemite server, but keep the Lasso code running on the Lion server for the time being. I did a mysqldump of a production database and moved it to the new server and added it with mysql command line.

I set up lasso site admin on the Lion server to see the new MySQL server and created a unique test database on the new server and it worked beautifully.

So after importing the production database, it shows up in lasso site admin. At this point, I’m not sure what the proper procedure would be. I would like to  keep the same name for the database, but there would obviously be a conflict. Lasso site admin happily allows both to coexist, but my code only recognizes the original db on the Lion server. If I disable the original database, or even go as far as removing it from MySQL and lasso site admin, my lasso code throws an error saying the database cannot be access because it has been disabled. Which is basically true, but how do I get lasso to recognize the DB on the new server. It is enabled and all security is setup the same as the original. I’m afraid having the same DB name could be an issue. Should I consider renaming the DB and updating the lasso code, or am I missing something terribly obvious??

Thank you for any input!

Cheers!

Tom


--------
Tom Fortis
BFTV Cluster IT
UC Davis
(530)752-9167


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Ke Carlton-3
Try deleting the original host from Lasso Admin before adding the new host.

Best regards,

Ke

On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:

> Hello Lasso folks!
>
> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
> 5.6.20. My desire is to move the MySQL databases from the Lion server to
> the new Yosemite server, but keep the Lasso code running on the Lion server
> for the time being. I did a mysqldump of a production database and moved it
> to the new server and added it with mysql command line.
>
> I set up lasso site admin on the Lion server to see the new MySQL server
> and created a unique test database on the new server and it worked
> beautifully.
>
> So after importing the production database, it shows up in lasso site
> admin. At this point, I’m not sure what the proper procedure would be. I
> would like to  keep the same name for the database, but there would
> obviously be a conflict. Lasso site admin happily allows both to coexist,
> but my code only recognizes the original db on the Lion server. If I
> disable the original database, or even go as far as removing it from MySQL
> and lasso site admin, my lasso code throws an error saying the database
> cannot be access because it has been disabled. Which is basically true, but
> how do I get lasso to recognize the DB on the new server. It is enabled and
> all security is setup the same as the original. I’m afraid having the same
> DB name could be an issue. Should I consider renaming the DB and updating
> the lasso code, or am I missing something terribly obvious??
>
> Thank you for any input!
>
> Cheers!
>
> Tom
>
>
> --------
> Tom Fortis
> BFTV Cluster IT
> UC Davis
> (530)752-9167
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Tom Fortis
But, I need to have both hosts defined as I will have different databases on both.

Thanks!

Tom

> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>
> Try deleting the original host from Lasso Admin before adding the new host.
>
> Best regards,
>
> Ke
>
> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>
>> Hello Lasso folks!
>>
>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>> the new Yosemite server, but keep the Lasso code running on the Lion server
>> for the time being. I did a mysqldump of a production database and moved it
>> to the new server and added it with mysql command line.
>>
>> I set up lasso site admin on the Lion server to see the new MySQL server
>> and created a unique test database on the new server and it worked
>> beautifully.
>>
>> So after importing the production database, it shows up in lasso site
>> admin. At this point, I’m not sure what the proper procedure would be. I
>> would like to  keep the same name for the database, but there would
>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>> but my code only recognizes the original db on the Lion server. If I
>> disable the original database, or even go as far as removing it from MySQL
>> and lasso site admin, my lasso code throws an error saying the database
>> cannot be access because it has been disabled. Which is basically true, but
>> how do I get lasso to recognize the DB on the new server. It is enabled and
>> all security is setup the same as the original. I’m afraid having the same
>> DB name could be an issue. Should I consider renaming the DB and updating
>> the lasso code, or am I missing something terribly obvious??
>>
>> Thank you for any input!
>>
>> Cheers!
>>
>> Tom
>>
>>
>> --------
>> Tom Fortis
>> BFTV Cluster IT
>> UC Davis
>> (530)752-9167
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Mason Miller
Then I would go into the lasso admin and create aliases for the DB's that are getting moved that are different the the original DB names. Then add the new host. And make sure that the new host shows the correct names for the moved DB's.

Moving forward, I would create an include file that sets a variable for the DB names and use that in your inlines so that you can swap the DB names on the fly.

Mason

Sent from my iPhone

> On Aug 14, 2015, at 11:13 AM, Tom Fortis <[hidden email]> wrote:
>
> But, I need to have both hosts defined as I will have different databases on both.
>
> Thanks!
>
> Tom
>
>> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>>
>> Try deleting the original host from Lasso Admin before adding the new host.
>>
>> Best regards,
>>
>> Ke
>>
>>> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>>>
>>> Hello Lasso folks!
>>>
>>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>>> the new Yosemite server, but keep the Lasso code running on the Lion server
>>> for the time being. I did a mysqldump of a production database and moved it
>>> to the new server and added it with mysql command line.
>>>
>>> I set up lasso site admin on the Lion server to see the new MySQL server
>>> and created a unique test database on the new server and it worked
>>> beautifully.
>>>
>>> So after importing the production database, it shows up in lasso site
>>> admin. At this point, I’m not sure what the proper procedure would be. I
>>> would like to  keep the same name for the database, but there would
>>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>>> but my code only recognizes the original db on the Lion server. If I
>>> disable the original database, or even go as far as removing it from MySQL
>>> and lasso site admin, my lasso code throws an error saying the database
>>> cannot be access because it has been disabled. Which is basically true, but
>>> how do I get lasso to recognize the DB on the new server. It is enabled and
>>> all security is setup the same as the original. I’m afraid having the same
>>> DB name could be an issue. Should I consider renaming the DB and updating
>>> the lasso code, or am I missing something terribly obvious??
>>>
>>> Thank you for any input!
>>>
>>> Cheers!
>>>
>>> Tom
>>>
>>>
>>> --------
>>> Tom Fortis
>>> BFTV Cluster IT
>>> UC Davis
>>> (530)752-9167
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Peter D Bethke
Hi Tom,

I’ve done stuff like this a bunch of times - its not super tricky once you understand how lasso admin aliases work (and how cool a feature actually they are).

Mason is right - the answer is aliases. If you’ve not used them in Lasso admin before, its a feature that lets you rename a database in the admin while its actual name stays the same.

It also lets migrations from a apache/mysql box to separate apache + mysql boxes like this work a little smoother. If you haven’t already,

So, say your main database is called my_database. Go to the original host, and alias the old database (that is now also  on the new host and that you want to migrate), to something like my_database_old. For the new host, the database name remains the same.

Now, when your inline looks for a db, it’ll prefer the new host, because the old host has _old attached to the alias - as far as lasso is concerned, its not the same db (even though it is).

Call me or shoot me an email is this seems confusing at all.

Best,

Peter Bethke
Lassosmart.com
434-984-4718


> On Aug 14, 2015, at 11:29 AM, Mason Miller <[hidden email]> wrote:
>
> Then I would go into the lasso admin and create aliases for the DB's that are getting moved that are different the the original DB names. Then add the new host. And make sure that the new host shows the correct names for the moved DB's.
>
> Moving forward, I would create an include file that sets a variable for the DB names and use that in your inlines so that you can swap the DB names on the fly.
>
> Mason
>
> Sent from my iPhone
>
>> On Aug 14, 2015, at 11:13 AM, Tom Fortis <[hidden email]> wrote:
>>
>> But, I need to have both hosts defined as I will have different databases on both.
>>
>> Thanks!
>>
>> Tom
>>
>>> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>>>
>>> Try deleting the original host from Lasso Admin before adding the new host.
>>>
>>> Best regards,
>>>
>>> Ke
>>>
>>>> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>>>>
>>>> Hello Lasso folks!
>>>>
>>>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>>>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>>>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>>>> the new Yosemite server, but keep the Lasso code running on the Lion server
>>>> for the time being. I did a mysqldump of a production database and moved it
>>>> to the new server and added it with mysql command line.
>>>>
>>>> I set up lasso site admin on the Lion server to see the new MySQL server
>>>> and created a unique test database on the new server and it worked
>>>> beautifully.
>>>>
>>>> So after importing the production database, it shows up in lasso site
>>>> admin. At this point, I’m not sure what the proper procedure would be. I
>>>> would like to  keep the same name for the database, but there would
>>>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>>>> but my code only recognizes the original db on the Lion server. If I
>>>> disable the original database, or even go as far as removing it from MySQL
>>>> and lasso site admin, my lasso code throws an error saying the database
>>>> cannot be access because it has been disabled. Which is basically true, but
>>>> how do I get lasso to recognize the DB on the new server. It is enabled and
>>>> all security is setup the same as the original. I’m afraid having the same
>>>> DB name could be an issue. Should I consider renaming the DB and updating
>>>> the lasso code, or am I missing something terribly obvious??
>>>>
>>>> Thank you for any input!
>>>>
>>>> Cheers!
>>>>
>>>> Tom
>>>>
>>>>
>>>> --------
>>>> Tom Fortis
>>>> BFTV Cluster IT
>>>> UC Davis
>>>> (530)752-9167
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Tom Fortis
Peter, Mason and Ke,

Thank you for the discussion and input!  This works well and will greatly simplify my database moves.

One additional question: Is there a tag or a method to programmatically determine the name of the datasource host that a particular database is being hosted from?

Thank you to the Lasso community! You all are a great resource.

Tom

> On Aug 17, 2015, at 7:50 AM, Peter D Bethke <[hidden email]> wrote:
>
> Hi Tom,
>
> I’ve done stuff like this a bunch of times - its not super tricky once you understand how lasso admin aliases work (and how cool a feature actually they are).
>
> Mason is right - the answer is aliases. If you’ve not used them in Lasso admin before, its a feature that lets you rename a database in the admin while its actual name stays the same.
>
> It also lets migrations from a apache/mysql box to separate apache + mysql boxes like this work a little smoother. If you haven’t already,
>
> So, say your main database is called my_database. Go to the original host, and alias the old database (that is now also  on the new host and that you want to migrate), to something like my_database_old. For the new host, the database name remains the same.
>
> Now, when your inline looks for a db, it’ll prefer the new host, because the old host has _old attached to the alias - as far as lasso is concerned, its not the same db (even though it is).
>
> Call me or shoot me an email is this seems confusing at all.
>
> Best,
>
> Peter Bethke
> Lassosmart.com
> 434-984-4718
>
>
>> On Aug 14, 2015, at 11:29 AM, Mason Miller <[hidden email]> wrote:
>>
>> Then I would go into the lasso admin and create aliases for the DB's that are getting moved that are different the the original DB names. Then add the new host. And make sure that the new host shows the correct names for the moved DB's.
>>
>> Moving forward, I would create an include file that sets a variable for the DB names and use that in your inlines so that you can swap the DB names on the fly.
>>
>> Mason
>>
>> Sent from my iPhone
>>
>>> On Aug 14, 2015, at 11:13 AM, Tom Fortis <[hidden email]> wrote:
>>>
>>> But, I need to have both hosts defined as I will have different databases on both.
>>>
>>> Thanks!
>>>
>>> Tom
>>>
>>>> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>>>>
>>>> Try deleting the original host from Lasso Admin before adding the new host.
>>>>
>>>> Best regards,
>>>>
>>>> Ke
>>>>
>>>>> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>>>>>
>>>>> Hello Lasso folks!
>>>>>
>>>>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>>>>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>>>>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>>>>> the new Yosemite server, but keep the Lasso code running on the Lion server
>>>>> for the time being. I did a mysqldump of a production database and moved it
>>>>> to the new server and added it with mysql command line.
>>>>>
>>>>> I set up lasso site admin on the Lion server to see the new MySQL server
>>>>> and created a unique test database on the new server and it worked
>>>>> beautifully.
>>>>>
>>>>> So after importing the production database, it shows up in lasso site
>>>>> admin. At this point, I’m not sure what the proper procedure would be. I
>>>>> would like to  keep the same name for the database, but there would
>>>>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>>>>> but my code only recognizes the original db on the Lion server. If I
>>>>> disable the original database, or even go as far as removing it from MySQL
>>>>> and lasso site admin, my lasso code throws an error saying the database
>>>>> cannot be access because it has been disabled. Which is basically true, but
>>>>> how do I get lasso to recognize the DB on the new server. It is enabled and
>>>>> all security is setup the same as the original. I’m afraid having the same
>>>>> DB name could be an issue. Should I consider renaming the DB and updating
>>>>> the lasso code, or am I missing something terribly obvious??
>>>>>
>>>>> Thank you for any input!
>>>>>
>>>>> Cheers!
>>>>>
>>>>> Tom
>>>>>
>>>>>
>>>>> --------
>>>>> Tom Fortis
>>>>> BFTV Cluster IT
>>>>> UC Davis
>>>>> (530)752-9167
>>>>>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Peter D Bethke
Hi Tom,

Inside an inline, yes I believe so. Outside an inline I don’t think so (by that I mean a tag like [hostInfo(my database)]

[Database_HostInfo] should work inside the inline, IIRC.

It would be easy though to create a custom tag that functioned like  [hostInfo(my database)] - just stick the inline inside the Ctag and set the return value to be the output of database_hostinfo, in whole or just a part of the array u wanted.

Peter

> On Aug 17, 2015, at 12:48 PM, Tom Fortis <[hidden email]> wrote:
>
> Peter, Mason and Ke,
>
> Thank you for the discussion and input!  This works well and will greatly simplify my database moves.
>
> One additional question: Is there a tag or a method to programmatically determine the name of the datasource host that a particular database is being hosted from?
>
> Thank you to the Lasso community! You all are a great resource.
>
> Tom
>
>> On Aug 17, 2015, at 7:50 AM, Peter D Bethke <[hidden email]> wrote:
>>
>> Hi Tom,
>>
>> I’ve done stuff like this a bunch of times - its not super tricky once you understand how lasso admin aliases work (and how cool a feature actually they are).
>>
>> Mason is right - the answer is aliases. If you’ve not used them in Lasso admin before, its a feature that lets you rename a database in the admin while its actual name stays the same.
>>
>> It also lets migrations from a apache/mysql box to separate apache + mysql boxes like this work a little smoother. If you haven’t already,
>>
>> So, say your main database is called my_database. Go to the original host, and alias the old database (that is now also  on the new host and that you want to migrate), to something like my_database_old. For the new host, the database name remains the same.
>>
>> Now, when your inline looks for a db, it’ll prefer the new host, because the old host has _old attached to the alias - as far as lasso is concerned, its not the same db (even though it is).
>>
>> Call me or shoot me an email is this seems confusing at all.
>>
>> Best,
>>
>> Peter Bethke
>> Lassosmart.com
>> 434-984-4718
>>
>>
>>> On Aug 14, 2015, at 11:29 AM, Mason Miller <[hidden email]> wrote:
>>>
>>> Then I would go into the lasso admin and create aliases for the DB's that are getting moved that are different the the original DB names. Then add the new host. And make sure that the new host shows the correct names for the moved DB's.
>>>
>>> Moving forward, I would create an include file that sets a variable for the DB names and use that in your inlines so that you can swap the DB names on the fly.
>>>
>>> Mason
>>>
>>> Sent from my iPhone
>>>
>>>> On Aug 14, 2015, at 11:13 AM, Tom Fortis <[hidden email]> wrote:
>>>>
>>>> But, I need to have both hosts defined as I will have different databases on both.
>>>>
>>>> Thanks!
>>>>
>>>> Tom
>>>>
>>>>> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>>>>>
>>>>> Try deleting the original host from Lasso Admin before adding the new host.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Ke
>>>>>
>>>>>> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>>>>>>
>>>>>> Hello Lasso folks!
>>>>>>
>>>>>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>>>>>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>>>>>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>>>>>> the new Yosemite server, but keep the Lasso code running on the Lion server
>>>>>> for the time being. I did a mysqldump of a production database and moved it
>>>>>> to the new server and added it with mysql command line.
>>>>>>
>>>>>> I set up lasso site admin on the Lion server to see the new MySQL server
>>>>>> and created a unique test database on the new server and it worked
>>>>>> beautifully.
>>>>>>
>>>>>> So after importing the production database, it shows up in lasso site
>>>>>> admin. At this point, I’m not sure what the proper procedure would be. I
>>>>>> would like to  keep the same name for the database, but there would
>>>>>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>>>>>> but my code only recognizes the original db on the Lion server. If I
>>>>>> disable the original database, or even go as far as removing it from MySQL
>>>>>> and lasso site admin, my lasso code throws an error saying the database
>>>>>> cannot be access because it has been disabled. Which is basically true, but
>>>>>> how do I get lasso to recognize the DB on the new server. It is enabled and
>>>>>> all security is setup the same as the original. I’m afraid having the same
>>>>>> DB name could be an issue. Should I consider renaming the DB and updating
>>>>>> the lasso code, or am I missing something terribly obvious??
>>>>>>
>>>>>> Thank you for any input!
>>>>>>
>>>>>> Cheers!
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>>
>>>>>> --------
>>>>>> Tom Fortis
>>>>>> BFTV Cluster IT
>>>>>> UC Davis
>>>>>> (530)752-9167
>>>>>>
>>>>>>
>>>>>> #############################################################
>>>>>>
>>>>>> This message is sent to you because you are subscribed to
>>>>>> the mailing list Lasso [hidden email]
>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: L8.6 MySQL db moved to standalone server not being recognized properly

Tom Fortis
Peter,

This is great. I created a custom tag to return a requested host attribute for a given database. I had some trouble finding the Database_HostInfo documentation. I should have gone to look at the online docs at lassosoft.com first.

Thank you so much for your help!

Tom

> On Aug 17, 2015, at 11:54 AM, Peter D Bethke <[hidden email]> wrote:
>
> Hi Tom,
>
> Inside an inline, yes I believe so. Outside an inline I don’t think so (by that I mean a tag like [hostInfo(my database)]
>
> [Database_HostInfo] should work inside the inline, IIRC.
>
> It would be easy though to create a custom tag that functioned like  [hostInfo(my database)] - just stick the inline inside the Ctag and set the return value to be the output of database_hostinfo, in whole or just a part of the array u wanted.
>
> Peter
>
>> On Aug 17, 2015, at 12:48 PM, Tom Fortis <[hidden email]> wrote:
>>
>> Peter, Mason and Ke,
>>
>> Thank you for the discussion and input!  This works well and will greatly simplify my database moves.
>>
>> One additional question: Is there a tag or a method to programmatically determine the name of the datasource host that a particular database is being hosted from?
>>
>> Thank you to the Lasso community! You all are a great resource.
>>
>> Tom
>>
>>> On Aug 17, 2015, at 7:50 AM, Peter D Bethke <[hidden email]> wrote:
>>>
>>> Hi Tom,
>>>
>>> I’ve done stuff like this a bunch of times - its not super tricky once you understand how lasso admin aliases work (and how cool a feature actually they are).
>>>
>>> Mason is right - the answer is aliases. If you’ve not used them in Lasso admin before, its a feature that lets you rename a database in the admin while its actual name stays the same.
>>>
>>> It also lets migrations from a apache/mysql box to separate apache + mysql boxes like this work a little smoother. If you haven’t already,
>>>
>>> So, say your main database is called my_database. Go to the original host, and alias the old database (that is now also  on the new host and that you want to migrate), to something like my_database_old. For the new host, the database name remains the same.
>>>
>>> Now, when your inline looks for a db, it’ll prefer the new host, because the old host has _old attached to the alias - as far as lasso is concerned, its not the same db (even though it is).
>>>
>>> Call me or shoot me an email is this seems confusing at all.
>>>
>>> Best,
>>>
>>> Peter Bethke
>>> Lassosmart.com
>>> 434-984-4718
>>>
>>>
>>>> On Aug 14, 2015, at 11:29 AM, Mason Miller <[hidden email]> wrote:
>>>>
>>>> Then I would go into the lasso admin and create aliases for the DB's that are getting moved that are different the the original DB names. Then add the new host. And make sure that the new host shows the correct names for the moved DB's.
>>>>
>>>> Moving forward, I would create an include file that sets a variable for the DB names and use that in your inlines so that you can swap the DB names on the fly.
>>>>
>>>> Mason
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Aug 14, 2015, at 11:13 AM, Tom Fortis <[hidden email]> wrote:
>>>>>
>>>>> But, I need to have both hosts defined as I will have different databases on both.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Tom
>>>>>
>>>>>> On Aug 13, 2015, at 4:59 PM, Ke Carlton <[hidden email]> wrote:
>>>>>>
>>>>>> Try deleting the original host from Lasso Admin before adding the new host.
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Ke
>>>>>>
>>>>>>> On Fri, Aug 14, 2015 at 11:45 AM Tom Fortis <[hidden email]> wrote:
>>>>>>>
>>>>>>> Hello Lasso folks!
>>>>>>>
>>>>>>> My current setup is a mac mini running Lion, L8.6, MySQL 5.5.21. I have
>>>>>>> set up a MySQL server-only on a new mac mini running Yosemite and MySQL
>>>>>>> 5.6.20. My desire is to move the MySQL databases from the Lion server to
>>>>>>> the new Yosemite server, but keep the Lasso code running on the Lion server
>>>>>>> for the time being. I did a mysqldump of a production database and moved it
>>>>>>> to the new server and added it with mysql command line.
>>>>>>>
>>>>>>> I set up lasso site admin on the Lion server to see the new MySQL server
>>>>>>> and created a unique test database on the new server and it worked
>>>>>>> beautifully.
>>>>>>>
>>>>>>> So after importing the production database, it shows up in lasso site
>>>>>>> admin. At this point, I’m not sure what the proper procedure would be. I
>>>>>>> would like to  keep the same name for the database, but there would
>>>>>>> obviously be a conflict. Lasso site admin happily allows both to coexist,
>>>>>>> but my code only recognizes the original db on the Lion server. If I
>>>>>>> disable the original database, or even go as far as removing it from MySQL
>>>>>>> and lasso site admin, my lasso code throws an error saying the database
>>>>>>> cannot be access because it has been disabled. Which is basically true, but
>>>>>>> how do I get lasso to recognize the DB on the new server. It is enabled and
>>>>>>> all security is setup the same as the original. I’m afraid having the same
>>>>>>> DB name could be an issue. Should I consider renaming the DB and updating
>>>>>>> the lasso code, or am I missing something terribly obvious??
>>>>>>>
>>>>>>> Thank you for any input!
>>>>>>>
>>>>>>> Cheers!
>>>>>>>
>>>>>>> Tom
>>>>>>>
>>>>>>>
>>>>>>> --------
>>>>>>> Tom Fortis
>>>>>>> BFTV Cluster IT
>>>>>>> UC Davis
>>>>>>> (530)752-9167
>>>>>>>
>>>>>>>
>>>>>>> #############################################################
>>>>>>>
>>>>>>> This message is sent to you because you are subscribed to
>>>>>>> the mailing list Lasso [hidden email]
>>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>>> Send administrative queries to  <[hidden email]>
>>>>>>
>>>>>> #############################################################
>>>>>>
>>>>>> This message is sent to you because you are subscribed to
>>>>>> the mailing list Lasso [hidden email]
>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>