hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : windows and mysql
Reply

Forum Jump

windows and mysql

Reply Post New Thread In Web Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-17-2007, 01:34 AM
WebGuru72 WebGuru72 is offline
Junior Guru
 
Join Date: Jan 2006
Posts: 229

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



Sponsored Links
  #2  
Old 07-17-2007, 02:41 AM
PremiumHost PremiumHost is offline
Web Hosting Master
 
Join Date: Jan 2005
Posts: 3,224
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 2012 SmarterMail Enterprise


  #3  
Old 07-17-2007, 04:05 AM
thewebhostingdir thewebhostingdir is offline
Disabled
 
Join Date: Jan 2005
Posts: 181
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.

Sponsored Links
  #4  
Old 07-17-2007, 10:48 PM
WebGuru72 WebGuru72 is offline
Junior Guru
 
Join Date: Jan 2006
Posts: 229
Quote:
Originally Posted by thewebhostingdir View Post
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.
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

  #5  
Old 07-21-2007, 09:45 AM
Will-AH Will-AH is offline
Web 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

  #6  
Old 07-21-2007, 12:35 PM
RSNET-John RSNET-John is offline
Web Hosting Master
 
Join Date: Feb 2007
Posts: 1,896
Quote:
Originally Posted by WebGuru72 View Post
Can I run cron job on windows.... How can I get mysql to dump all databases to a certain location?
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 >> 1000+ Gbit Premium Only Redundant Network, N+2 Redundant Data Center, 100% Uptime SLA
LOWER YOUR DEDICATED SERVER AND DDOS PROTECTION COSTS TODAY - NYC DDoS Protection Available
See our Dedicated Server Specials for AMAZING DEALS

  #7  
Old 08-07-2007, 03:29 PM
appliedi appliedi is offline
WHT 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

__________________
Applied Innovations (www.appliedi.net)
Microsoft Gold Certified Hosting Partner, ASP.net Featured Host.
Specializing in Windows Hosting since 1999.
The Windows Hosting Experts (TM), now offering Windows Cloud Servers We're hiring!

  #8  
Old 08-13-2007, 04:00 PM
WebGuru72 WebGuru72 is offline
Junior Guru
 
Join Date: Jan 2006
Posts: 229
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

  #9  
Old 08-13-2007, 04:05 PM
RSNET-John RSNET-John is offline
Web Hosting Master
 
Join Date: Feb 2007
Posts: 1,896
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 >> 1000+ Gbit Premium Only Redundant Network, N+2 Redundant Data Center, 100% Uptime SLA
LOWER YOUR DEDICATED SERVER AND DDOS PROTECTION COSTS TODAY - NYC DDoS Protection Available
See our Dedicated Server Specials for AMAZING DEALS

  #10  
Old 08-13-2007, 04:10 PM
appliedi appliedi is offline
WHT 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

__________________
Applied Innovations (www.appliedi.net)
Microsoft Gold Certified Hosting Partner, ASP.net Featured Host.
Specializing in Windows Hosting since 1999.
The Windows Hosting Experts (TM), now offering Windows Cloud Servers We're hiring!

  #11  
Old 08-13-2007, 04:15 PM
Will-AH Will-AH is offline
Web 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

Reply

Related posts from TheWhir.com
Title Type Date Posted
Uhuru Joins Effort to Bring .NET and SQL Server to OpenShift Web Hosting News 2014-03-06 10:33:15
Microsoft Surpasses Amazon as Largest Windows Hosting Company: Netcraft Web Hosting News 2014-02-27 17:05:44
Google Releases Hosted Database Service Cloud SQL to General Availability Web Hosting News 2014-02-12 13:46:02
Google Cloud Provides Support For Native MySQL Connections Web Hosting News 2013-11-01 14:36:06
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?