Reputation: 1513
I've set up a website on my local drive and created a table with xamp and php myadmin. The simple answer I'm asking is: how do I transfer the table into the server? I've tried to export the file with sql extension placing it in the root directory of the remote but that didn't work.
Upvotes: 1
Views: 102
Reputation: 334
So you need to save the file as .sql no archieve and then choose import in your server sqladmin
Upvotes: 1
Reputation: 508
You can export using phpMyAdmin as .sql format and import in the remote server either using phpMyAdmin (import) or by giving the file name as paramter to mysql command
Eg : mysql -u username -D databasename -p < filname.sql
replace username with your username & databasename with your datbasename to which the tables have to be imported and filename.sql as the filename to be imported
the filename.sql should be in your current directory where ever you are executing the mysql command from.
Upvotes: 1
Reputation: 521
In general, one would use mysqldump to create a dump and then import said dump on your server.
Another option to consider is using so called migrations. These are, basically, SQL scripts that introduce or remove changes to your table layout or necessary priming data.
A last option would be to use phpMyAdmin on your local environment and, again, import the created dump on your server using either phpMyAdmin (but you shouldn't really have that on a public-facing production server) or through the commandline.
Upvotes: 1
Reputation: 8179
Simple, After Export
the sql
file, you need to Import
it via phpmyadmin.
Upvotes: 2
Reputation: 44851
You need to import the data somehow, not just put the .sql file on your server. Try using phpMyAdmin, which is likely already installed on your production server.
Upvotes: 1