ccomley
asked on
How to empty tables.
SugarCRM comes with an excellent script which sets up the whole system from blank - installing Apache, MySql, PHP, all required modules and options are configured, etc. Brilliant - just how software should be.
But then it assumes that you're an expert in the underlying stuff.
We chose the option to install the demo Sugar data and taht was very useful but now we've finished playing and want to use it for real, we need to get rid of the demo data. Is there an easy script to do this? No! The best advice we can get from the Sugar forums is to use the MySql admin tools to empty the tables in the database.
Fine.
How?
I can find a bin called "mysqladmin", I guess this can do it, but the info on syntax is not exactly beginner-friendly. I gues one needs to supply the database name (any clues what it would be) and password (this I can guess - Sugar Install kept asking me for passwords to use for different things and I know what I told it) and somehow to specify that I want ALL the (non-system) tables to be emptied...
But then it assumes that you're an expert in the underlying stuff.
We chose the option to install the demo Sugar data and taht was very useful but now we've finished playing and want to use it for real, we need to get rid of the demo data. Is there an easy script to do this? No! The best advice we can get from the Sugar forums is to use the MySql admin tools to empty the tables in the database.
Fine.
How?
I can find a bin called "mysqladmin", I guess this can do it, but the info on syntax is not exactly beginner-friendly. I gues one needs to supply the database name (any clues what it would be) and password (this I can guess - Sugar Install kept asking me for passwords to use for different things and I know what I told it) and somehow to specify that I want ALL the (non-system) tables to be emptied...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please beware that above procedure would empty all the tables in the supplied schema... and if you want to selective tables then go by the comment one in which I have shown you how to truncate single tables..
Also, here is the link for admin tool from MySQL..
http://dev.mysql.com/downloads/gui-tools/5.0.html
Also, here is the link for admin tool from MySQL..
http://dev.mysql.com/downloads/gui-tools/5.0.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - chose to do a re-install because there appear to be just SO many not-quite-standard elements to the way this is set up so I'd be for-ever trying to adjust your answers to fit the situation.
Login to MySQL.. via command line or any GUI tools (you can download it from mysql.com freely).. and create below stored routine in one of schema...that's it...
Open in new window