Results 1 to 13 of 13
  1. #1
    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.

  2. #2
    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.

  3. #3
    Join Date
    Oct 2011
    Location
    Redding, CA
    Posts
    62
    Quote Originally Posted by kooshin View Post
    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.
    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. >>>

  4. #4
    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.

  5. #5
    Quote Originally Posted by kooshin View Post
    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.
    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.

  6. #6
    Quote Originally Posted by wiwid View Post
    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.
    Sorry, for 24 jam, I mean 24 hours. jam = hours in my language.

  7. #7
    Join Date
    Oct 2003
    Location
    Sana'a
    Posts
    183
    thanks Wiwid, I will certainly look into that.

  8. #8
    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.

  9. #9
    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.

  10. #10
    Join Date
    May 2008
    Location
    U.S.A.
    Posts
    77
    Quote Originally Posted by kooshin View Post
    Also what is the best way to backup data in every 24 hours since the data will be changed in everyday
    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

  11. #11
    Join Date
    Oct 2003
    Location
    Sana'a
    Posts
    183
    Yes, root is there.Good explanations Vectro. Thank you very much

  12. #12
    Quote Originally Posted by kooshin View Post
    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.
    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.

  13. #13
    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

  1. Getting phpmysql password in Cpanel
    By Jon12345 in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 03-16-2011, 04:38 PM
  2. Managing Database websites
    By arty101 in forum Programming Discussion
    Replies: 6
    Last Post: 07-09-2009, 05:54 AM
  3. ModSecurity blocking PHPMySQL
    By roacha in forum Hosting Security and Technology
    Replies: 4
    Last Post: 10-12-2008, 09:39 AM
  4. program/database for managing clients domains
    By freddowar in forum Web Hosting
    Replies: 7
    Last Post: 06-25-2008, 02:06 PM
  5. phpMySQL help ... please?
    By raine in forum Web Hosting Lounge
    Replies: 3
    Last Post: 02-08-2002, 11:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •