Question on MySQL - Pardon my Ignorance


Hello All !
thanks for looking at this, appreciate your time.
My Q is very simple - yet I am not certain how it is done.
This is my first time building a website, I am designing the website on my laptop, I have setup the apache webserver and MySQL databases and I am able to connect and work on them.
Now my Q is, after I complete my website, how do I upload the database? I know there is an article on Wiki here which tells the procedure, but my concern is - Do I need to make a database and all the tables within it manually ( with same names ) on dreamhost servers via Panel first or I can simply import the database and everything works fine?
Also, when the website is up and running, and I make changes to DB, do I again need to import the entire DB again or only relevant files ?
Please help me understand this.

thanks for your patience.


To answer your first question: That depends on how you backed it up. 99.999% of the time you can just import it and it will work fine.

To answer your second question: Incremental MySQL backups are a huge pain. It’s generally better to make snapshots If you want to work separately between your laptop and “live” environment. Take backups of the entire database, drop the database and re-import. This is not ideal, especially if you are not the only one changing data of the live side. Perhaps someone else can recommend a better option.


thank you for your reply.
Anyone else have anything?


Q1) All you need here is an empty database with a user. Your SQL dump will import and create all it needs.

Q2) Since we don’t know what your database looks like, or how it performs, I’d refresh the hosted database by dropping all tables and do the import again. With some clever scripting, you can automate this process. To speed things up, you might want to add your home’s IP address to the db user access.


Thank you -appreciate