Tag Archives: MySQL

Backing up mySQL Databases Batch File / Script

And another, this time to backup the databases, based on an earlier post or creating simple backups, I can then call this batch from within another batch file. @echo off IF %1.==. GOTO No1 ECHO Dave’s mySQL Database Backup UtilityECHO …

Read more »

mySQL Restore Batch File / Script

I got bored typing mysql commands so wrote a little script to keep on my box for easy access to restore databases from .sql files. It’s very simple and may not be any use to anyone. It also stores the …

Read more »

PHP optimisation in Windows IIS

Firstly, use the non-thread-safe version of PHP, its more efficient, see here. If you are unsure which version you have, check the very top of phpinfo() Then you can make some slight changes to php that will save some processing …

Read more »

OSTicket Database Errors (Polish Characters)

I’ve had a few emails from OSTicket recently, telling me that there was a DB error, specifically: Incorrect string value: ‘xC2x0AThan…’ for column ‘message’ at row 1 The email had originated from a Yahoo address and so my initial thought …

Read more »

Speeding up MySQL Databases by setting the Query Cache Size

I use MySQL in a Windows Server 2008 R2 box and it runs very well, I never have any issues with it and currently there are about 18 databases on there. However, it now has a fair bit of data …

Read more »

Script to 7-zip all files and then delete the originals

I wrote a while back about a script which would go through my backup directory and 7-zip my .bak and .sql files and then delete the originals, so that they were much smaller to then backup to my elephant drive. …

Read more »

phpMyAdmin – Error. Cannot start session without errors

I was doing some work in phpmyadmin earlier and a bit of messing about, I got this error: “phpMyAdmin – Error. Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your …

Read more »

Restore a MySQL Database Backup from the .sql File

I’ve written a bit on backing up data and have been asked how to restore data to MySQL. Pretty simple, assuming you have your backup file, just run: “C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe” -uUSERNAME -pPASSWORD DATABASENAME < “c:\BACKUPFILENAME.sql” On the box …

Read more »

Simple Script to backup MySQL Databases

This is a simple script I use to backup MySQL databases. Save the following as backup.bat (or similar) and they you can set a scheduled task to run this daily. “C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqldump.exe” -uUSERNAME -pPASSWORD MYSQLDBNAME > “c:\folder\mysqldbname\mysqldbname_%time:~0,2%%time:~3,2%%time:~6,2%_%date:~-10,2%%date:~-7,2%%date:~-4,4%.sql” The …

Read more »