AnsweredAssumed Answered

Scripts to reset Alfresco installation

Question asked by robertmarkbram on Jun 6, 2010
Latest reply on Jun 6, 2014 by robin.clarke
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.

Outcomes