That's true, you would need to consider that risk. Can a DEB package ask for information before deployment? If so you could ask for the username/password and run the mysql command using the provided info. Therefore not risking the problem of having a username/password within the files. Although I am making a big assumption on whether you can grab input and use that in scripts of course :)
Dave -----Original Message----- From: Andre Matos [mailto:[EMAIL PROTECTED] Sent: 02 October 2008 17:51 To: Heston James - Cold Beans Cc: mysql@lists.mysql.com Subject: Re: Deployment of Database in a DEB package. Just be aware about the security. I use shell or perl scripts to make automatic dumps (backups) or updates/changes in the database. Unfortunately, because they are automatic scripts, I need to add the username and password inside the scripts and if someone else have access to these scripts (e.g., read access), he/she will see this information. Andre On 2-Oct-08, at 11:57 AM, Heston James - Cold Beans wrote: > Dave, > > This looks like a perfect solution. We can indeed use a shell script > for the task in hand and knowing that we an action the .sql script so > simply from the command line like that makes life very simple indeed > :-) > > I can't see this will cause too many challenges. > > Thanks Dave, I appreciate it a great deal. > > Heston > > -----Original Message----- > From: Ellison, David [mailto:[EMAIL PROTECTED] > Sent: 02 October 2008 07:24 > To: mysql@lists.mysql.com > Subject: RE: Deployment of Database in a DEB package. > > I know nothing of DEB packages. However, when we need to change / make > a database etc on automatic scripts. We would write the script and > save it to a .sql file on console. We would then create a shell script > that had something like: > > mysql -u <username> -p etc < yourinsertsql.sql > > Essentially the username would have the ability to create tables/ db's > if the DB does not exist already, so make sure the user exists first. > > If you wanted to remove the DB afterwards, although if a DEB can do > it, ask first if you want to remove the DB. Have another .sql script > with essentially dropping the database. Then same again a shell that: > > mysql -u <username> -p etc < yourremovesql.sql > > This is of course assuming you can refer to a shell script in a DEB > package. But from what I have seen when using them, I would guess they > are used. > > Hope this helped. > > Dave > > -----Original Message----- > From: Heston James - Cold Beans [mailto:[EMAIL PROTECTED] > Sent: 01 October 2008 15:22 > To: mysql@lists.mysql.com > Subject: Deployment of Database in a DEB package. > > Afternoon All, > > > > I'm hoping you'll have some recommendations for me on this little > challenge. > I have an application which we're preparing to deploy in a DEB package > using APT on Debian based systems, although I would imagine this very > same rule/process applies to other packaging methods. > > > > On the back end of my application we have a MySQL Database which needs > to be created as part of the deployment process, which is automated in > a script, usually SHELL or Perl, something like that. > > > > How would you deploy the database using an automated script? Would you > have a SQL script which you action through the console to create the > database? > What's the simplest way to action a SQL script to run on the local > server? > Do we need to keep in mind what permissions/users are assigned to the > database? > > > > In addition to this create script, we'll also need to have an > automated, > scripted process for removing the database if the package is removed, > I'd be interested to get your thoughts on that too. > > > > Thanks in advance for any suggestions guys, > > > > Heston > > > > This message has been scanned for viruses by MailControl - (see > http://bluepages.wsatkins.co.uk/?6875772) > > > This email and any attached files are confidential and copyright > protected. > If you are not the addressee, any dissemination of this > communication is > strictly prohibited. Unless otherwise expressly agreed in writing, > nothing > stated in this communication shall be legally binding. > > The ultimate parent company of the Atkins Group is WS Atkins plc. > Registered in England No. 1885586. Registered Office Woodcote > Grove, Ashley > Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins Group > companies > registered in the United Kingdom can be found at > http://www.atkinsglobal.com/terms_and_conditions/index.aspx > > Consider the environment. Please don't print this e-mail unless you > really > need to. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- Dr. André Matos [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]