Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Exporting PHPMyAdmin database to live server.

  • 07-12-2016 08:19PM
    #1
    Closed Accounts Posts: 5,482 ✭✭✭


    I have been working on a college project for the last while, and I need to deploy it . My database is with phpmyadmin, so my question is how do a export this to use with my application when it's live.


Comments

  • Registered Users, Registered Users 2 Posts: 6,272 ✭✭✭Buford T Justice


    mysqldump -u [username] -p [database_name] > [location-to-save.sql]
    
    next prompt will ask for your password, assuming you have one set.


    On the live site, its a case of:
    mysql -u [username] -p [database_name] < [location-to-file.sql]
    
    next prompt will ask for password, assuming you have one set.

    Have you command line access to both databases?


  • Registered Users, Registered Users 2 Posts: 6,682 ✭✭✭daymobrew


    Or, if you are used to using phpMyAdmin, export to SQL from there and then go to phpMyAdmin on the live server and import. Obviously this relies on the live server having phpMyAdmin.

    While this is slower than using the command line that Buford has suggested, it sounds like you may be more comfortable with a web interface like phpMyAdmin.


  • Registered Users, Registered Users 2 Posts: 6,272 ✭✭✭Buford T Justice


    daymobrew wrote: »
    Or, if you are used to using phpMyAdmin, export to SQL from there and then go to phpMyAdmin on the live server and import. Obviously this relies on the live server having phpMyAdmin.

    While this is slower than using the command line that Buford has suggested, it sounds like you may be more comfortable with a web interface like phpMyAdmin.

    Remember, you are limited to the size of the database doing it this way.


  • Registered Users, Registered Users 2 Posts: 6,682 ✭✭✭daymobrew


    Remember, you are limited to the size of the database doing it this way.
    True - though gzip can help for upload size issues.

    I suggested the simpler web interface because OP says My database is with phpmyadmin instead of "I have a SQL database".


Advertisement