PDA

View Full Version : best way to access client database


dsdsdsdsd
01-11-2012, 12:22 PM
just curious: when you deliver an app to a client, you upload server files via ftp probably ... but how do you upload mysql database?

wvxvw
01-14-2012, 09:56 AM
SSH to the server and mysql < dumpfile.sql I'd also usually check in the databes dump with the code. But if it is more complex than that, I'd probably write an SQL script to populate the database.

dsdsdsdsd
01-14-2012, 12:10 PM
it has been a while since I SSH'd. I believe, though, that getting my client to participate would require them to do a bit of IT'ish work on their end to set it up, and they don't have an IT dept. ... just a secretary.

When you SSH, who controls that? Is the server owner in control of the SSH?



after I thought about this for a while I realized that a php class that:
1 - 'copies' my db ( from my development environment )
2 - 'pastes' my db onto the client's server/mysql db

would be a good way to go, especially in that I already have the necessary access to do so. After I run ( one-time ) the script on the client server, I can then delete that copy_paste.php from their server.

- Shannon

wvxvw
01-14-2012, 08:53 PM
Oh, well, I didn't mean shared hosting. Usually I'd be told that there is a server at such and such address, the user name and the password, and whoever registered all those things would be responsible for privileges / permissions I get. Today shared hosting sites usually have some sort of an admin dashboard kind of thing, I'd look there for possible solutions. What you ask sounds like a common task, probably someone already put together a utility for that with nice GUI and stuff :)

PS. I'd rather think about a script that uploads the project, populates the database and does whatever else is needed to deploy the site. But this script would run from my local environment, connecting through SSH. This way you could both test the deploying script off-line on your machine + have your site deployed automatically (huge benefit!) + you could've given it to the customer, so that they would be able to manage the site w/o all the necessary bureaucracy of knowing thousands of password, the directory structure, etc.

uplight
01-15-2012, 04:43 AM
Are you really need SQL SERVER to manage data for your application? since ORACLE owned MYSQL I found better solution and glad I did so

dsdsdsdsd
01-15-2012, 08:57 AM
yeah, typically I get access to client's hosting GUI, but not this time because it is a city's main office, and their security rules wont allow them to grant access like that. So all I really have is ftp access to a sub-directory.

-- thanks for your time, Shannon