Results 1 to 11 of 11
Thread: windows and mysql
-
07-17-2007, 01:34 AM #1Junior Guru
- Join Date
- Jan 2006
- Posts
- 230
windows and mysql
Due to my limited knowledge with Linux. I was thinking of running windows with mysql and php.... the question is, how do I back up mysql nightly?
also what can I use to send emails from a mail php command? how about mod rewrtie.... can you please shed some light on that.....
I can look into linux, but now I am not comfrtable to have it in production as I will have to manage the server for client onsite... they do not want it to be hosted anywhere.Web Hosting Review - Real Reviews by Real People Submit your company and get a link to your site, Read Reviews GET YOUR Voice HEARD and REVIEW your HOST NOW!!! Check out our IT Blog Tips & Tricks
-
07-17-2007, 02:41 AM #2Web Hosting Master
- Join Date
- Jan 2005
- Posts
- 3,403
What's your point to run php & mysql on a windows hosting account?
If you manage a windows server, you can search for backup software running on windows.PremiumReseller.com Hyper-V SSD VPS USA London Singapore
Reseller Hosting Cpanel PURE SSD CloudLinux Softaculous
Windows Reseller Asp.NET 4.5 MSSQL SmarterMail Enterprise
-
07-17-2007, 04:05 AM #3Disabled
- Join Date
- Jan 2005
- Posts
- 183
Hi,
PHP and MYSQL runs very good on windows servers too... Regarding your questions....
how do I back up mysql nightly?
>>> Most hosting companies provide phpmyadmin software tool to backup your mysql database. You can setup windows scheduler to take nightly backup... (run a cron file, with mysql commands)
also what can I use to send emails from a mail php command?
>>> mail() command with work.. you need to specify smtp server, port, email address and password (if your mail server needs authentication).
how about mod rewrtie....
>>> IIS REWRITE is option of mod rewrite available on windows server... if you need more information on this tool, just PM me.
-
07-17-2007, 10:48 PM #4Junior Guru
- Join Date
- Jan 2006
- Posts
- 230
Can I run cron job on windows.... How can I get mysql to dump all databases to a certain location?
where do I configure the smtp settings so php knows how to communicate with the smtp server?
I will need more info on the IIS rewrite.....
sorry too many questions.... is phpmyadmin easy to setup "Secure" it will be a dedicated server onsite.
Thank you for your great help and info.Web Hosting Review - Real Reviews by Real People Submit your company and get a link to your site, Read Reviews GET YOUR Voice HEARD and REVIEW your HOST NOW!!! Check out our IT Blog Tips & Tricks
-
07-21-2007, 09:45 AM #5Web Hosting Guru
- Join Date
- Jun 2006
- Location
- Albany, NY
- Posts
- 258
Backing up of MySQL databases is done via a command line utility called mysqldump. However, web applications such as phpMyAdmin also allow you to do it on demand through a web based interface. The equivalent of cron on Windows is called "Scheduled Tasks" and, since it looks like you are using your own server, it should be very easy for you to setup, it's in the control panel.
The default mail configuration for PHP on Windows is actually defined in the system's php.ini file. If you need to authenticate against an SMTP server, I would look into a custom PHP mailer class to help out, especially if you're ever sending HTML messages out.
I would recommend ISAPI_Rewrite from HeliconTech at http://www.isapirewrite.com/ - They offer a free trial and a somewhat limited free version.
The best thing you could do if you're not familiar with all of this and you're going to be operating an important web site is to use a hosting company that can provide you the support you need for your dedicated server. The secure setup and configuration of some of the open source apps (PHP and MySQL) can actually be fairly tricky for a newcomer. Specifically, PHP is very easy to setup insecurely on the Windows platform if you're not familiar with NTFS permissions and users that are used by IIS and Windows.ActiveHost - Upstate New York Data Center Services: Powering the Active Business with ProActive Service
Windows and Linux Cloud Hosting, VPS, Dynamic Dedicated Servers, Colocation
In business since 1996. Privately owned multi-million dollar data center. 24x7 Support.
www.activehost.com sales@activehost.com 1-518-372-2842
-
07-21-2007, 12:35 PM #6Web Hosting Master
- Join Date
- Feb 2007
- Posts
- 3,666
You can use the scheduled tasks to cscript the following script:
Save the text below in a text file, edit the variables and make sure to put a .vbs extension on it. You can run it by calling cscript filename.vbs through the command prompt.
Code:'********************************************************************************** ' MYSQL Backup & Backup File Maintainance '============================================================= ' 'This application is unsupported. Using this application is at your own risk ' 'This application backups for mysql databases and also allows you state now long 'you want the backup files to be kept before being compressed then deleted. ' 'Installation '------------- 'Update the following settings to relect the setup of your mysqlserver ' 'This value should be set to the name of your mysql server. Keep this to the same format 'as the example value. 'This value should be set to the path of the backup files location. 'Keep this to the same format as the example value. This directory must exist Const strMYBackup="C:\MyBackupDir\" 'This value should be the location of you mysql bin directory Const strMYLocation = "C:\Program Files\MySQL\MySQL Server 5.0\bin\" 'This should be your mysql password Const strMYPassword = "ENTERYOURPASSWORD HERE" 'This should be a mysql account with root access on all databases Const strMYUser = "root" 'This value sets the number of days worth of backups that should be kept. Any backup files, 'either compressed or uncompressed, will by removed if they are older than the number of 'days set. Const RemoveOlderThan=30 'This value sets the number of days worth of backups that should be kept unarchived. Any 'backup files, uncompressed, will by compressed if they are older than the number of 'days set. Const ArchiveOlderTHan=7 'To complete this application installation type in the following command into the 'command prompt so that the application runs within a command prompt instead of producing 'hundreds of message boxes: ' cscript //h:cscript ' 'The final step is to add this script into the Windows scheduled tasks. 'Generally the quietest hosting time is around 6-7am. '********************************************************************************** strBackup = formatdatetime(now,2) strbackup = right("0" & replace(strbackup,"/",""),8) strConn ="DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;USER=" & strMYUser & ";PASSWORD="& strMYPassword & ";OPTION=3;" Set rsDomains = CreateObject("ADODB.Recordset") strsql = "show databases" rsdomains.activeconnection = strConn rsDomains.Open strSQL While Not rsDomains.EOF strDomain = rsDomains.fields(0).value Dim oShell Set oShell = WScript.CreateObject ("WSCript.shell") oShell.run "cmd /C " & Chr(34) &strMYLocation & "mysqldump" & Chr(34) & " -B " & strDomain & " -u " & strMYUser & " -p" & strMYpassword & " > " & strMYBackup & "dbBkup" & strBackup & strDomain & ".sql",,true Set oShell = Nothing rsDomains.MoveNext Wend rsDomains.Close Set rsDomains = Nothing todayDate=cDate(day(now) &" "& MonthName(Month(Now),true) &" "& Year(Now)) Set WshShell = WScript.CreateObject("WScript.Shell") set fso = CreateObject ("Scripting.FileSystemObject") Set fsqlDir = fso.getfolder(strMYBackup) For Each fsql in fsqlDir.Files If UCase(Right(fsql.Name,4))=".CAB" Then fileDate=fsql.datecreated If fileDate< DateAdd("d", toDayDate, -RemoveOlderThan) Then fsql.Delete End If ElseIf UCase(Right(fsql.Name,4))=".SQL" Then fileDate=fsql.datecreated If fileDate< DateAdd("d", toDayDate, -RemoveOlderThan) Then fsql.Delete Else '---CAB sqlfile---- if fileDate < DateAdd("d", toDayDate, -ArchiveOlderTHan) Then CABCommand = "MAKECAB /V1 "& fsql.Path &" "& Left(fsql.Path,Len(fsql.Path)-3) &"cab" CABReturnCode = WshShell.Run(CABCommand, 7, True) fsql.Delete End If End If '---Done--- End if Next Set WshShell=Nothing
ReliableSite.Net LLC - Offering Enterprise Grade Dedicated Servers Since 2006 [New York City metro / Miami, FL / Los Angeles, CA]
Customers are our #1 priority - Read Our Reviews
Need epic pricing on 1G and 10G unmetered? We have amazing deals and a 10 minute setup time! Click here to view incredible deals.
-
08-07-2007, 03:29 PM #7WHT Addict
- Join Date
- Jul 2003
- Posts
- 130
Contrary to what many will have you believe this can all be done on Windows and done securely, reliably and perform very nicely. The key is knowing how to do it properly (just like on Linux).
There's a great program for doing scheduled remote MySQL backups that I love to use for my own mysql db's. It's at: http://www.swordsky.com/
Jess<<Please see rules for signature setup>>
-
08-13-2007, 04:00 PM #8Junior Guru
- Join Date
- Jan 2006
- Posts
- 230
Guys thank you all very much... This has been much greater of help than I thought I would get.....
Someone said, oh, run apache on windows instead of IIS... do you agree? I do not know much about apache, but he said it is simple to understand.... I know IIS pretty well.... (not an expert but know it good enough to do whatever I need to do and check whatever I need to check)Web Hosting Review - Real Reviews by Real People Submit your company and get a link to your site, Read Reviews GET YOUR Voice HEARD and REVIEW your HOST NOW!!! Check out our IT Blog Tips & Tricks
-
08-13-2007, 04:05 PM #9Web Hosting Master
- Join Date
- Feb 2007
- Posts
- 3,666
Apache on Windows, why would you do such a thing? IIS is honestly a much better web server. Otherwise there is no reason to use Windows. Get IIS going with a seperate application pool for each domain and you'll be good to go!
ReliableSite.Net LLC - Offering Enterprise Grade Dedicated Servers Since 2006 [New York City metro / Miami, FL / Los Angeles, CA]
Customers are our #1 priority - Read Our Reviews
Need epic pricing on 1G and 10G unmetered? We have amazing deals and a 10 minute setup time! Click here to view incredible deals.
-
08-13-2007, 04:10 PM #10WHT Addict
- Join Date
- Jul 2003
- Posts
- 130
Don't waste the time on Apache, you should be able to do everything that's needed. What app are you looking to run?
Jess<<Please see rules for signature setup>>
-
08-13-2007, 04:15 PM #11Web Hosting Guru
- Join Date
- Jun 2006
- Location
- Albany, NY
- Posts
- 258
That someone must hold a grudge against Microsoft or just not be very knowledgeable. If it were IIS 5 or Apache, that's definitely debatable. I was honestly never a fan of IIS 5 even when I had to administer it. However, IIS 6 is absolutely amazing, and as much as it pains the MS-Haters to admit it, it's much more secure than Apache. There have been no critical security exploits for IIS 6 since it's release with Windows Server 2003. Speaking as someone who's administered both in the past, IIS 6 is much easier to configure and run securely than Apache.
ActiveHost - Upstate New York Data Center Services: Powering the Active Business with ProActive Service
Windows and Linux Cloud Hosting, VPS, Dynamic Dedicated Servers, Colocation
In business since 1996. Privately owned multi-million dollar data center. 24x7 Support.
www.activehost.com sales@activehost.com 1-518-372-2842