homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Updating Multiple Databases
humpingdan




msg:3410270
 9:03 am on Aug 1, 2007 (gmt 0)

I need to update 100 databases, we have a default username and password in each database in the table staff.

We need to change this username and password for each occurance in each database.

Its the admin pass and user for each website, the ID of the Admin account is different in each database so will have to update by firstname and surname.

update staff
set username "AdminNew"
set password "passNew"
where fname = "Administrator"

but across 100 databases

Any help apreciated

 

LifeinAsia




msg:3410528
 3:23 pm on Aug 1, 2007 (gmt 0)

Do you mean 100 databases or 100 tables? What DB are you using?

phranque




msg:3410817
 7:06 pm on Aug 1, 2007 (gmt 0)

if the table has the same data in all 100 db's, you could create the table in one db, dump it, and then import it into the other 99.

or you could create a script that generates 100 files containing the proper update sql for each db and then another script to feed the correct sql file as input into the correct db.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved