2

I'm very new to PHP and MySQL, so this question might sound really dumb, but I am genuinely curious about the answer.

Using some tutorials, I'm creating a user login/registration system with the PHPMyAdmin and SQL tools given by MAMP for Mac. I later want to upload this whole database on a specific page of my website. My website, though, is hosted on another web server, not locally.

My question is: will I have to remake the user login/registration system when I upload all of my website files to the external web server, or will all of that be retained?

Maybe my understanding is flawed, but hopefully someone can shed some light.

Shrey
  • 522
  • 8
  • 16
  • *"will I have to remake the user login/registration system when I upload all of my website files to the external web server"* - not really. Just export your db data in an .sql file then import it into the new one. – Funk Forty Niner Jul 22 '15 at 04:05
  • @Fred-ii- Sorry, but I have no idea what that means – Shrey Jul 22 '15 at 04:05
  • see http://www.tutorialspoint.com/mysql/mysql-database-export.htm and if you've phpmyadmin or similar, you can easily export/import from in there. Google "export import database MySQL" for more results. see also this Q&A http://stackoverflow.com/q/11407349/ – Funk Forty Niner Jul 22 '15 at 04:07

1 Answers1

2

Dump your local database to an SQL file:

mysqldump -u username -p yourdatabase_name > backup.sql

Import the SQL in to your remote database:

mysql -u username -p yourdatabase_name < backup.sql
Ben Fried
  • 2,168
  • 1
  • 14
  • 13
  • that's already been stated in comments in a link I gave them http://stackoverflow.com/q/11407349/ so that should be marked as a duplicate. – Funk Forty Niner Jul 22 '15 at 04:11