I have created a LOCALHOST MYSQL DB and am now wanting to test it online. How do I transfer all the info and DB to the server?
2 Answers
Do you have something like phpMyAdmin available both locally and on the server? If yes, you could use it to export the complete database and import in on the other server.
Otherwise, mysqldump would be possible to get a sql dump of you local database that can be used to get the data to the new server:
mysqldump -u username -p database_name > dump.sql
4 Comments
GreenKhan
I am currently using MySQL Workbench. There is NO GUI to this? :D
René Höhle
@user1115933: phpmyadmin is the Web GUI for MySQL ;) normaly the most hoster install it. On with system do you work? Windows or Linux? If you work on Windows you have to use the mysqldump.exe in your mysql/bin/ folder on your console.
GreenKhan
Ok I used the EXPORT command and got some files named dbname_tablename.sql. So HOW do I get these files onto my webserver (Online)?
fkerber
It depends on the possibilities you have on your server. Do you have phpMyAdmin available there? Can you "install" it, if not? Do you have commandline access to the server? Also perhaps important: webserver is not in all cases the database server. My hosting provider for example has dedicated servers only for databases and others only for hosting the user files.
Use mysqldump to save it to a file. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html