cancel
Showing results for 
Search instead for 
Did you mean: 

Scripts to reset Alfresco installation

robertmarkbram
Champ in-the-making
Champ in-the-making
Hi All,

I found the scripts to reset Alfresco-Community-3.3 didn't work because they assumed mysql was on the PATH. I modified them as per below:

Remove:
:: db_remove.bat
@echo off
rem —————————————
rem MySQL remove DB command
rem —————————————

set SCRIPT_HOME=%~dps0
cd ..\..\..\mysql\bin

echo Deleting Alfresco database and user…
mysql -u root -p < %SCRIPT_HOME%\db_remove.sql

echo Deleting indexes…
del /s /q "../../alf_data"
pause

Setup:

:: db_setup.bat
@echo off
rem —————————————
rem MySQL create DB command
rem —————————————

set SCRIPT_HOME=%~dps0
cd ..\..\..\mysql\bin

echo Creating Alfresco database and user…
mysql -u root -p < %SCRIPT_HOME%\db_setup.sql

echo Database prepared.
pause

More detail in my blog post Resetting a local Alfresco installation.

EDIT [28/06/2010 3:40:33 PM]: modifed path in "del" line of db_remove.bat script as per Mr Rogers correction. Added "pause" statements.
8 REPLIES 8

robertmarkbram
Champ in-the-making
Champ in-the-making
I don't think the scripts are useful at all. Every time I try them, I get this error afterwards:
16:20:39,500 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 05250000 The store 'avm://sitestore' has a duplicate root node entry.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:288)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:68)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:180)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:247)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:184)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

mrogers
Star Contributor
Star Contributor
Your script looks very similar to mine which does work. 😎

Double check that your script is deleting the contents of your alf data folder as well as the database.   

And in general its probably a better idea to change your script to use absolute paths rather than relative paths.

And (another one after reading your blog!) you should not need to delete the tomcat/webapps/alfresco folder.     You can if you want but it should not be required.

mrogers
Star Contributor
Star Contributor
err ….  looking at your script again …

Your script changes directory into the mysql/bin.
and then tries to delete ../alf_data   (i.e. mysql/alf_data)

Is that location correct?   I suspect not.

robertmarkbram
Champ in-the-making
Champ in-the-making
Hi Mr Rogers,

And in general its probably a better idea to change your script to use absolute paths rather than relative paths.

If you mean computing absolute paths from "%~dps0", I can understand how it might be more readable:
SET SCRIPT_HOME=%~dps0
SET ALFRESCO_HOME=%SCRIPT_HOME%\..\..\..

But I definitely would not hard code absolute paths in a script. Far too fragile i.e. not portable:
SET ALFRESCO_HOME=D:\apps\Alfresco-Community-3.3

And if a script using relative paths breaks because the paths within the Alfresco install have changed, then a script using absolute paths will break too.

Double check that your script is deleting the contents of your alf data folder as well as the database.

OK, will do that.


Your script changes directory into the mysql/bin.
and then tries to delete ../alf_data (i.e. mysql/alf_data)

Is that location correct? I suspect not.

Oh. Bugger. Thank you. Smiley Happy

robertmarkbram
Champ in-the-making
Champ in-the-making
Fixing the paths doesn't make the scripts work either.

1) MySql *must* be running or db_remove.sql and db_setup.sql will fail..
2) So I kill Tomcat but leave mysql running and execute db_remove.sql with the following output:

D:\apps\Alfresco-Community-3.3\extras\databases\mysql>db_remove.bat
Deleting Alfresco database and user…
Enter password:
Deleting indexes…
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\18\604408ba-365f-4505-a0bc-3b80fd305f29.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\18\a41f9b1c-d4e2-4210-a94e-f51bc61925bc.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\0068210f-dd22-47fd-a662-96c00f4ced1e.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\011b1b82-ace0-497e-bcc3-3e1a0672118b.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\10940fba-e8a7-414b-a90d-6350e29f37ab.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\1548be71-dabb-467f-9608-d08b7bd8dcdc.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\1b718f5b-47ec-46a6-84e7-890cf672af5d.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\22b966ed-bba0-4371-8465-1be57aea9a54.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\25f777f7-3e45-438f-8e79-dedc5f796ebd.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\26f4ab36-c2fd-47a1-880d-90e8f7f039ec.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\2d1cb53c-c19f-4412-8e19-97e7ed44b202.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\2e8aac1a-fd6a-4fcf-8fa1-5735f6f4c255.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\34419672-1411-4224-b3f9-da10b829932c.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\35396ba3-9da1-43c2-8d8d-be6ef613a9cf.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\3722cb0a-b5a4-453c-bd3f-81e2d710225d.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\3f6e7ac0-1fe7-4f48-aae9-b4b967493474.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\48d1208c-4a84-43de-a7f5-bba1b656727c.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\4de7b7bc-9914-493a-9b13-98d42bf58854.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\52085e03-a181-4631-b4af-608e9ec4db5b.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\53359b13-3700-4f45-b25b-df5a9dcfa1d1.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\53d9d603-cc6a-4679-9857-6a80e67d4824.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\558f7747-4412-4901-9ff0-fcbc9672146a.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\5945601d-016e-4d71-880e-9f25ee6c5571.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\5d38266e-7985-427a-85bf-743a93bc96f3.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\60becc39-aed7-40c3-9dcd-4ab733d03900.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\6152561d-a60d-407f-ab51-b10fff2955cb.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\68e360a6-1429-4b85-8a6b-d88809f9940b.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\695ff18c-49cc-4072-a6b0-082f7c4d1635.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\7295f7c1-df5a-499f-96dc-cacbda0f1b60.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\731cfff9-e03e-4685-a397-6c699e54a72e.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\7d639e03-220b-4049-b26d-8edf5fed1148.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\87da3dbd-0434-4758-8d88-c2529be15293.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\8bb067e1-f4ee-408d-8dc4-ab7594a1914c.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\8e9498a8-9746-4c71-a16e-e498296b4cf9.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\93ec1e1f-3757-49f7-9632-57da05b262cb.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\97e9a048-81c2-40e2-b9e4-3b1602f0390f.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\9eff53cb-03cf-4f4a-a749-f0aa97d98484.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\9f442e8d-b1d6-480b-b448-5ddaa9c94163.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\a084c3ea-4339-4c67-ae8f-c2fc667502d0.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\a23e07dd-c621-4cfb-96a6-7f2c22b15110.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\a354b39d-d7c7-4ddf-8dbc-1106970692c4.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\a8b982a1-4eee-4ae8-b91a-97ae517a471c.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\b01e8555-b17b-4bcf-9426-766966318773.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\becd4b68-a537-4025-a5d8-693a01e2fb7f.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\c2311ae3-c567-48ea-85ef-fb944210a0bf.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\c4f0addc-accc-45a7-babb-1bffd79dbf70.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\ce22295f-7264-487e-b143-ee37b0b917a5.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\d19ed619-56ec-4cb9-9fa7-187f9139bd4f.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\d4db29c1-378c-4adf-8dc8-392501019cc9.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\dc2da969-0205-4084-bffe-e5c0965190bb.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\eb903ca2-2c70-4397-b81d-689b9ce1e040.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\ec246f60-39e7-4086-b244-da9fbf3a64d3.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\ed7b459a-1d57-449e-bef5-745e765d6328.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\19\f8767c9a-4d9b-494b-b99a-7cbec6984fe1.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\contentstore\2010\6\28\16\23\09931d9b-9bab-41fe-9197-5adadeb586d7.bin
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\archive\SpacesStore\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\archive\SpacesStore\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\archive\SpacesStore\47ef6dc5-2587-4f7d-b056-4214a926a5d8\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\archive\SpacesStore\47ef6dc5-2587-4f7d-b056-4214a926a5d8\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\archive\SpacesStore\47ef6dc5-2587-4f7d-b056-4214a926a5d8\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\avm\sitestore\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\avm\sitestore\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\avm\sitestore\28d6ae78-103b-4d35-a324-71fde6ede741\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\avm\sitestore\28d6ae78-103b-4d35-a324-71fde6ede741\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\avm\sitestore\28d6ae78-103b-4d35-a324-71fde6ede741\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\system\system\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\system\system\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\system\system\6cf02e26-0326-4a5d-b0bd-b0e2a956e9c9\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\system\system\6cf02e26-0326-4a5d-b0bd-b0e2a956e9c9\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\system\system\6cf02e26-0326-4a5d-b0bd-b0e2a956e9c9\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\user\alfrescoUserStore\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\user\alfrescoUserStore\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\user\alfrescoUserStore\650483a7-a8f8-4fbe-8591-251ef2c6f058\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\user\alfrescoUserStore\650483a7-a8f8-4fbe-8591-251ef2c6f058\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\user\alfrescoUserStore\650483a7-a8f8-4fbe-8591-251ef2c6f058\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\lightWeightVersionStore\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\lightWeightVersionStore\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\lightWeightVersionStore\76b2f56a-4188-42af-acc8-a2200f61cb5a\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\lightWeightVersionStore\76b2f56a-4188-42af-acc8-a2200f61cb5a\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\lightWeightVersionStore\76b2f56a-4188-42af-acc8-a2200f61cb5a\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\23acbcd1-0abc-4ca6-b090-6137da5650ae\IndexInfoDeletions
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\23acbcd1-0abc-4ca6-b090-6137da5650ae\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\23acbcd1-0abc-4ca6-b090-6137da5650ae\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\23acbcd1-0abc-4ca6-b090-6137da5650ae\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\3b71ef53-c1c9-4fb7-b919-fa5a8be9c035\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\3b71ef53-c1c9-4fb7-b919-fa5a8be9c035\segments_3
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\3b71ef53-c1c9-4fb7-b919-fa5a8be9c035\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\3b71ef53-c1c9-4fb7-b919-fa5a8be9c035\_0_1.del
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b7450ce9-53f1-484e-a7ab-e1c1f2f0472e\IndexInfoDeletions
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b7450ce9-53f1-484e-a7ab-e1c1f2f0472e\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b7450ce9-53f1-484e-a7ab-e1c1f2f0472e\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b7450ce9-53f1-484e-a7ab-e1c1f2f0472e\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b90e4389-d7a0-4c61-82ea-b6d8f122c02d\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b90e4389-d7a0-4c61-82ea-b6d8f122c02d\segments_3
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b90e4389-d7a0-4c61-82ea-b6d8f122c02d\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\b90e4389-d7a0-4c61-82ea-b6d8f122c02d\_0_1.del
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\c8c0af1d-cba3-47e5-a547-35d74652b61e\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\c8c0af1d-cba3-47e5-a547-35d74652b61e\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\c8c0af1d-cba3-47e5-a547-35d74652b61e\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\edc255bd-7921-4fcb-a9f6-b330657aaac7\IndexInfoDeletions
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\edc255bd-7921-4fcb-a9f6-b330657aaac7\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\edc255bd-7921-4fcb-a9f6-b330657aaac7\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\SpacesStore\edc255bd-7921-4fcb-a9f6-b330657aaac7\_0.cfs
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\version2Store\IndexInfo
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\version2Store\IndexInfoBackup
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\version2Store\b3e08a0d-54ac-4ca5-945b-6318d77cb620\segments.gen
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\version2Store\b3e08a0d-54ac-4ca5-945b-6318d77cb620\segments_2
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\lucene-indexes\workspace\version2Store\b3e08a0d-54ac-4ca5-945b-6318d77cb620\_0.cfs
D:\apps\Alfresco-Community-3.3\alf_data\mysql\ibdata1
The process cannot access the file because it is being used by another process.
D:\apps\Alfresco-Community-3.3\alf_data\mysql\ib_logfile0
The process cannot access the file because it is being used by another process.
D:\apps\Alfresco-Community-3.3\alf_data\mysql\ib_logfile1
The process cannot access the file because it is being used by another process.
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\spike.pid
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\columns_priv.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\columns_priv.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\columns_priv.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\db.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\db.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\db.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\event.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\event.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\event.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\func.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\func.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\func.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\general_log.CSM
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\general_log.CSV
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\general_log.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_category.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_category.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_category.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_keyword.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_keyword.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_keyword.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_relation.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_relation.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_relation.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_topic.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_topic.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\help_topic.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\host.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\host.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\host.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\ndb_binlog_index.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\ndb_binlog_index.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\ndb_binlog_index.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\plugin.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\plugin.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\plugin.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\proc.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\proc.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\proc.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\procs_priv.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\procs_priv.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\procs_priv.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\servers.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\servers.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\servers.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\slow_log.CSM
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\slow_log.CSV
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\slow_log.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\tables_priv.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\tables_priv.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\tables_priv.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_leap_second.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_leap_second.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_leap_second.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_name.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_name.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_name.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition_type.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition_type.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\time_zone_transition_type.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\user.frm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\user.MYD
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\mysql\mysql\user.MYI
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\.lock
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\autotext\mytexts.bau
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\basic\dialog.xlc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\basic\script.xlc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\basic\Standard\dialog.xlb
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\basic\Standard\Module1.xba
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\basic\Standard\script.xlb
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\arrowhd_en-US.soe
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\autotbl.fmt
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\classic_en-US.sog
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\cmyk.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\fontnames.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\gallery.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\hatching_en-US.soh
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\html.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\modern_en-US.sog
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\palette_en-US.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.sob
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.sod
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.soe
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.sog
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\standard.soh
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\styles_en-US.sod
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\sun-color.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\config\web.soc
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\database\biblio.odb
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\database\biblio\biblio.dbf
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\database\biblio\biblio.dbt
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\gallery\sg100.sdv
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\gallery\sg100.thm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\gallery\sg30.sdv
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\gallery\sg30.thm
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.LDAP.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Addons.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Commands.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Common.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Compatibility.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Events.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Histories.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Jobs.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Linguistic.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Logging.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.OOoImprovement.Settings.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Paths.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.ProtocolHandler.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Recovery.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Substitution.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.TabBrowse.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.TypeDetection.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.UI.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.UI.GlobalSettings.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.UI.WriterWebWindowState.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.UI.WriterWindowState.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Views.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.Writer.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Office.WriterWeb.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.Setup.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.System.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.TypeDetection.Filter.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.TypeDetection.Misc.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.TypeDetection.Types.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.ucb.Configuration.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.ucb.Store.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.UserProfile.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\cache\org.openoffice.VCL.dat
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\data\org\openoffice\Setup.xcu
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\data\org\openoffice\Office\Common.xcu
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\data\org\openoffice\Office\Linguistic.xcu
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\registry\data\org\openoffice\Office\Views.xcu
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\uno_packages\cache\log.txt
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\uno_packages\cache\stamp.sys
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\uno_packages\cache\uno_packages.db
Deleted file - D:\apps\Alfresco-Community-3.3\alf_data\oouser\user\uno_packages\cache\registry\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\registered_packages.db
Press any key to continue . . .

3) I then run db_setup.sql with the following output:
D:\apps\Alfresco-Community-3.3\extras\databases\mysql>db_setup.bat
Creating Alfresco database and user…
Enter password:
Database prepared.
Press any key to continue . . .

4) But MYSQL now fails to start again..
Starting MySQL…
D:\apps\ALFRES~1.3\mysql\bin\mysqld: Table 'mysql.plugin' doesn't exist
100628 16:55:32 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100628 16:55:32  InnoDB: Started; log sequence number 0 5870661
100628 16:55:32 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
Press any key to continue . . .

mikeh
Star Contributor
Star Contributor
You should never delete MySQL's database files from the disk - that's just asking for trouble.

Always use the scripts to drop database tables. Then delete the Alfresco content folders from within alf_data, i.e. audit.contentstore, backup-lucene-indexes, contentstore, contentstore.deleted, lucene-indexes

I'm a little surprised you've got MySQL installed within the alf_data folder: was that our installers that did that?

Thanks,
Mike

robertmarkbram
Champ in-the-making
Champ in-the-making
Hi Mike,

You should never delete MySQL's database files from the disk - that's just asking for trouble.

I'm just running the (slightly modified) scripts that came with Alfresco-Community-3.3. Originals are:

Tear down script.

:: db_remove.bat
@echo off
rem —————————————
rem MySQL remove DB command
rem —————————————

echo Deleting Alfresco database and user…
mysql -u root -p < db_remove.sql

echo Deleting indexes…
del /s /q "../../../alf_data"

and set-up script.
:: db_setup.bat
@echo off
rem —————————————
rem MySQL create DB command
rem —————————————

echo Creating Alfresco database and user…
mysql -u root -p < db_setup.sql

echo Database prepared.

I'm a little surprised you've got MySQL installed within the alf_data folder: was that our installers that did that?

I haven't done anything special in this regard i.e. I haven't changed any of the folders set up by the installer. The mysql and alf_data folders are root, relative to the Alfresco install.
[img]http://imagefrog.net/out.php/i96013_alfresco.jpg[/img]

robin_clarke
Champ in-the-making
Champ in-the-making
I tried running the same batch file and was unable to start Alfresco due to MySQL barfing. I eventually fixed it by reinstalling Alfresco 3.3 and doing a folder compare of the two installations.

I then copied
%FRESH_ALFRESCO_INSTALLATION_DIR%/alf_data/mysql
to my original installation folder and it worked again.