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]
mysqldump: Error 5: Out of memory
Hey Guys! I have been googling a lot on this error and read various suggestions. But havnt found an appropriate solution yet. I get this error while taking mysqldump of an InnoDB table (say mytable) mysqldump: Error 5: *Out of memory (Needed 632894352 bytes) when dumping table `mytable` at row: 484911* *current my.cnf settings:* innodb_buffer_pool_size = 256M innodb_additional_mem_pool_size = 32M max_allowed_packet = 1024M -q with mysqldump option did not help. it resulted in same error. Appreciate your quick response ! Much Thanks, Uma
Re: mysqldump: Error 5: Out of memory
Hi, Just try the below command on console. It will give that the error is exactly related to what. $perror 5 What is total ram in your box. On Thu, Oct 2, 2008 at 12:26 PM, Uma Bhat [EMAIL PROTECTED] wrote: Hey Guys! I have been googling a lot on this error and read various suggestions. But havnt found an appropriate solution yet. I get this error while taking mysqldump of an InnoDB table (say mytable) mysqldump: Error 5: *Out of memory (Needed 632894352 bytes) when dumping table `mytable` at row: 484911* *current my.cnf settings:* innodb_buffer_pool_size = 256M innodb_additional_mem_pool_size = 32M max_allowed_packet = 1024M -q with mysqldump option did not help. it resulted in same error. Appreciate your quick response ! Much Thanks, Uma -- Krishna Chandra Prajapati MySQL DBA, Ed Ventures e-Learning Pvt.Ltd. 1-8-303/48/15, Sindhi Colony P.G.Road, Secunderabad. Pin Code: 53 Office Number: 040-66489771 Mob: 9912924044 URL: ed-ventures-online.com Email-id: [EMAIL PROTECTED]
RE: Deployment of Database in a DEB package.
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]
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]
Views and replication
Hi all, In my master/salve setup the only database I do not replicate is mysql. The slave has only the users absolutely necessary to select and administer, that is why a lot of the users I have on the master are not there. When I create a view on the master the definer is set to the user I am logged in as. As this user does not exist on the slave the view is created there but I cannot select from it. I tried setting the definer to current_user in the hope it would mean user logged in in current session, not user that was logged in when creating the view. How can I get around this, I do not want to re-create all user that potentially could create views on the slave. Thanks Olaf - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]