Posts Tagged ‘Server2Go’
Backup Database Server2Go while developing.
When you are developing with the Server2Go stack, you might want to automatically backup your database periodicly.
I propose a simple script that backups your database each time when you start up your Self configuring database.
Script:
@echo off rem Add date to filename for /f "tokens=2" %%i in ('date /t') do set DATE_DOWNL=%%i for /f "tokens=1,2 delims=:" %%i in ('time /t') do set DATE_DOWNL=%DATE_DOWNL%_%%i%%j echo dumping database to MySql_%DATE_DOWNL%.sql .\server\mysql\bin\mysqldump --port=7188 -u root --all-databases >.\MySql_%DATE_DOWNL%.sql
Create a batch file with a name such as “backup.cmd” and place it in the same location where “server2go.exe” is located.
You will need to place it in your pms_config.ini :
[Startup] ;--- You can add additional EXE files that will be started in the startup process of Server2Go ;--- At the moment the EXE files will be started invisible and right AFTER the webserver ;--- and MySQL-Start Startup1=backup.cmd Startup2= Startup3=
So every time you start Server2Go a backup will be made. Also as long Server2Go is running you can execute the batch file whenever you want to make an additional extra backup.
Please +1 When you are using it!
How to install Magento on Server2Go
[Versions:
Magento : 1.4.1.1
Server2Go:1.8.1 (includes APACHE 2.2.15;PHP 5.3.2;SQLITE,MYSQL 5.1.46)]
- Obviously download Server2Go and Magento.
- Unblock (windows security feature) both zip files, (right click on zip, properties , Unblock)
- Extract both zip files.
- Go to the Server2Go folder and start Server2Go ( a broweser will open, IE)
- Click on the phpMyAdmin link (no passwd!)
- Create a database named ‘Magento’ (or any other name, but this howto will use Magento)
- Close down the browser, You’ll see that Server2Go is shutting down.
- Rename the ‘htdocs’ to ‘htdocs_org’
- Create a new folder ‘htdocs’
- Extract all files in the new ‘htdocs’ folder. Do not place the magento folder in the root but it’s content.
Now we need to edit a few files:
Change:
(Not required, but recommended)
LocalMirror=1
to
LocalMirror=0
MySQLCmd=–skip-innodb
to
MySQLCmd=
make changes to the [browser] settings if you want.
—
folder : server2go\server\config_tpl
file: php.ini
Change:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)
to
max_execution_time = 600 ; Maximum execution time of each script, in seconds
memory_limit = 512M ; Maximum amount of memory a script may consume (8MB)
;extension=php_curl.dll
to
extension=php_curl.dll
;extension=php_pdo_mysql.dll
to
extension=php_pdo_mysql.dll
—
Installation of Magento:
- Start the server2go executable (again IE opens)
- If magento files ware placed in the correct location, you will see the ‘Welcome to Magento’s Installation Wizard’.
- Read the license, and agree with it, press continue
- Change the localization to your preference, continue to next screen
- change ‘host’ to ‘127.0.0.1:7188’ (if you named your db anything other than ‘Magento’, change it as well)
- you can not use localhost (at least on win7) or else you’ll get :
“SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - Database connection error.”
- press continue, this will take a long time!
- Still need to wait,…
- Sigh, finally done (Database script just ran).
- There are a few other form to fill out, but you’ll manage this. TIP ** Save the encryption key **!
hope this helps 🙂