| Previous topic :: Next topic |
| Author |
Message |
BernardGBailey
Joined: 18 Dec 2007
Posts: 56
Location: Hamilton, New Zealand
|
| Posted: Tue Apr 29, 2008 8:02 am Post subject: How to empty database |
|
|
Hi team,
I've been successful importing more than 500 contactdetail and account records at a time in 5.03, actually 2366 contact details and 2400 account records, with no errors.
What I want to do now is to remove all those records and start again.
What tables do I need to delete the data from to support this, using MySql Browser or a like tool.
Your help is most appreciated
Cheers
Bernard |
|
| Back to top |
|
mvsn
Joined: 29 Oct 2006
Posts: 83
Location: Ontario, Canada
|
| Posted: Tue Apr 29, 2008 8:24 am Post subject: How to empty database |
|
|
Hi Bernard,
Remove the entries from vtiger_accounts, as well vtiger_contacts although as a futrue tip, once you get a basic setup installed, do a database dump this way you can quickly drop the tables in the database, and re-import the structure again...
Great for testing and playing around :) |
|
| Back to top |
|
BernardGBailey
Joined: 18 Dec 2007
Posts: 56
Location: Hamilton, New Zealand
|
| Posted: Tue Apr 29, 2008 10:30 am Post subject: How to empty database |
|
|
So you are saying all I have to do is delete from these tables
accountbillads
accountscf
accountshipads
account
contactdetails
contactaddress
contactscf
contactsubdetails
portalinfo
and I'll be able to import new entries again.
Cheers
Bernard |
|
| Back to top |
|
BernardGBailey
Joined: 18 Dec 2007
Posts: 56
Location: Hamilton, New Zealand
|
| Posted: Tue Apr 29, 2008 10:31 am Post subject: How to empty database |
|
|
Hi mvsn,
How do I do the database dump?
Cheers
Bernard |
|
| Back to top |
|
Landosmit
Joined: 05 Apr 2008
Posts: 14
Location: Vancouver BC Canada
|
| Posted: Tue Apr 29, 2008 5:25 pm Post subject: Re: How to empty database |
|
|
| If you have MySQL administrator, just login to the database the then go to the backup menu, select the tables, and backup it up. Later if you need to restore one or all of the tables just go to restore in MySQL administrator. |
|
| Back to top |
|
marius_1956
Joined: 18 Apr 2008
Posts: 11
Location: Roma, Italy
|
| Posted: Thu May 08, 2008 10:55 am Post subject: Re: How to empty database |
|
|
I started MySQL Admin, but I can't logon, and it looks that it it not connected to the local server: am I missing any relevant step?
Marius |
|
| Back to top |
|
BernardGBailey
Joined: 18 Dec 2007
Posts: 56
Location: Hamilton, New Zealand
|
| Posted: Thu May 08, 2008 11:18 am Post subject: Re: How to empty database |
|
|
I used Navicat for MySql. Looks like a great sql tool. and does backups and restores really easily.
Cheers
Bernard |
|
| Back to top |
|
BernardGBailey
Joined: 18 Dec 2007
Posts: 56
Location: Hamilton, New Zealand
|
| Posted: Thu May 08, 2008 11:19 am Post subject: Re: How to empty database |
|
|
Marius,
You may need to shut down the apache system applications in taskmanager (2 of them) then restart the vtiger application.
You should then be able to log in ok.
All the best.
Cheers
Bernard |
|
| Back to top |
|
robhowarth
Joined: 28 Mar 2007
Posts: 98
Location: Malaga
|
| Posted: Thu May 08, 2008 1:13 pm Post subject: Re: How to empty database |
|
|
I think a quicker way is to delete out of vtiger_crmentity. Pretty sure the foreign key constrains in the db won't let you delete directly in vtiger_accounts, vtiger_contactdetails etc....deelteing out of crmentity cascades the delete and removes all entries in the foreign key related tables.
I find the best way to dump (and backup) the database (on windows, at least) is to open a command prompt and type the following:
mysqldump -u root -p<rootpw> <vtdbname> > c:\vtigerdump.sql
to import it again, run:
mysql -u root -p<rootpw> <vtdbname> < c:\vtigerdump.sql
(replace <rootpw> with your root password and <vtdbmane> with the databse name you wish to backup/restore).
Rob |
|
| Back to top |
|
| |