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.

3
  • "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. Commented Jul 22, 2015 at 4:05
  • @Fred-ii- Sorry, but I have no idea what that means Commented Jul 22, 2015 at 4:05
  • see 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 stackoverflow.com/q/11407349 Commented Jul 22, 2015 at 4:07

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

1 Comment

that's already been stated in comments in a link I gave them stackoverflow.com/q/11407349 so that should be marked as a duplicate.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.