Results 1 to 13 of 13
Thread: managing database,PHPmysql.
-
02-05-2013, 07:42 PM #1Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
managing database,PHPmysql.
Hello there,
I am planning to make a website which will depend on database. It will be based on PHP and MYSQL. My question is, there will be a lot of data to be entered in the databse by different people in the same time. So what is the best way to make it run smoothly so that it will not crash and time out etc. Also what is the best way to backup data in every 24 hours since the data will be changed in everyday...like adding,removing,marking,...and too many other options.
Thanks for your time.
-
02-06-2013, 12:42 AM #2Temporarily Suspended
- Join Date
- Feb 2013
- Posts
- 245
Are you looking to create blog or a portal? If yes, you can directly use Wordpress or Joomla.
If you are looking for collaborative data entry, try using Google Docs & Google Sheets. Many people can simultaneously work on them in a shared way.
-
02-06-2013, 02:22 PM #3Junior Guru Wannabe
- Join Date
- Oct 2011
- Location
- Redding, CA
- Posts
- 62
To answer your question, there isn't a lot for you to do with MySQL "out of the box" to make it perform. In it's default configuration, it works pretty darn good for most small sites.
That being said, if you stick with InnoDB as your table type, it handles row-level locking automatically which is essential for large tables with many writes occurring. For tuning, you'll need to have your database running for a bit of time and take notes. You might want to try Mysql Tuner to give you some ideas, as well.
Backups are somewhat a religious debate among admins. My personal technique is to keep it simple and reliable, that's the key... these are backups! I personally run a mysqldump piped through gzip a few times per day, and the resulting files are picked up by nightly off-server backups. Your needs might differ, and there are several ways to accomplish your goals as well.<<< Please see Forum Guidelines for signature setup. >>>
-
02-07-2013, 11:32 AM #4Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
Thank you for your answers.It is not going to be like blog or something but something that will have a lot of data entry daily , with the ability to see years report.I am going to plan it little by little and see how things go.
-
02-09-2013, 10:11 PM #5Newbie
- Join Date
- Jan 2013
- Posts
- 11
For intensive transaction every day, you can choose VPS or dedicated hosting for that, and setting mysql from that (edit my.ini) and check the query. I prefer you hire database administrator to do that.
And for backup data for 24 jam, there are several script to do that. Just googling with keyword: "backup data with cron job" "backup mysql data with cron job" "backup files with cron job", and something like that.
-
02-10-2013, 03:13 AM #6Newbie
- Join Date
- Jan 2013
- Posts
- 11
-
02-10-2013, 05:58 PM #7Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
thanks Wiwid, I will certainly look into that.
-
02-10-2013, 09:34 PM #8Newbie
- Join Date
- Feb 2013
- Posts
- 10
If your database server gets a lot of traffic and stores critical data - I suggest to separate the application and have the database server on its own cloud or VPS instance.
Go with one of the cloud providers that have nightly snapshots as well.
-
02-11-2013, 05:30 PM #9Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
Thanks, towervpn , Hosting will be chosen carefully of course. But what I mean and I posted this question for, is how to make the PHP/MYSQL run smoothly so that people will not be getting timeouts and such things.
-
02-11-2013, 07:15 PM #10Junior Guru Wannabe
- Join Date
- May 2008
- Location
- U.S.A.
- Posts
- 77
Are you by any chance hosting your database on a cPanel server? Do you have root access on the server? If the answer is "Yes" to both, then the built in backup system in cPanel is your solution. There are different ways to configure it based on what you need. It can be scheduled to run as often as you need, even daily. You can make your backups a .tar.gz file or incremental backups which are not compressed/archived. cPanel also has an automated FTP backup feature for offsite backups. A different option would be to use the daily local backups and then use cron to FTP them or rsync them to an offsite server.
If you're not using cPanel, I would go with the suggestion bdowne01 made piping MySQL into gzip and using cron to send them offsite if needed.Vectro Web Hosting - Serious about tech support
x Proxy Host - Host Glype and other PHP proxy scripts
-
02-12-2013, 09:48 AM #11Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
Yes, root is there.Good explanations Vectro. Thank you very much
-
02-16-2013, 05:30 AM #12Newbie
- Join Date
- Feb 2013
- Posts
- 10
How many users are you expecting? Database servers are designed to handle the load, I'm sure you won't get any timeouts or bad performance assuming the server is adequate.
For example, I have a database that houses about 100K user records with about 200-500 unique visitors a day on just a VPS with just 768MB of memory. (MySQL)[TowerVPN] https://towervpn.com Global VPN servers, easy to use client software.
-
02-17-2013, 02:59 PM #13Junior Guru
- Join Date
- Oct 2003
- Location
- Sana'a
- Posts
- 183
The number of users will be thousands at start and there is a great chance many users will be on it on the same time.like adding a record, editing a record, requesting a report etc. It will be a financial site
Similar Threads
-
Getting phpmysql password in Cpanel
By Jon12345 in forum Hosting Software and Control PanelsReplies: 1Last Post: 03-16-2011, 04:38 PM -
Managing Database websites
By arty101 in forum Programming DiscussionReplies: 6Last Post: 07-09-2009, 05:54 AM -
ModSecurity blocking PHPMySQL
By roacha in forum Hosting Security and TechnologyReplies: 4Last Post: 10-12-2008, 09:39 AM -
program/database for managing clients domains
By freddowar in forum Web HostingReplies: 7Last Post: 06-25-2008, 02:06 PM -
phpMySQL help ... please?
By raine in forum Web Hosting LoungeReplies: 3Last Post: 02-08-2002, 11:25 PM