mysql back-up question - *.sql files?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tradmusic.com

    mysql back-up question - *.sql files?

    Hi,

    Newbie question...

    We have an online catalogue running off a mysql database, which we can back
    up. When we back it up, it creates a file online called "database.s ql"
    which, when opened in Notepad starts...
    DROP TABLE IF EXISTS store_category;
    CREATE TABLE store_category (
    category text NOT NULL,....etc

    If we want to transfer our database to a different host, how would we upload
    this .sql file into our new mysql database (on the new server)?

    Thanks.
    Nath.


  • Jonathan

    #2
    Re: mysql back-up question - *.sql files?

    tradmusic.com wrote:[color=blue]
    > Hi,
    >
    > Newbie question...
    >
    > If we want to transfer our database to a different host, how would we upload
    > this .sql file into our new mysql database (on the new server)?
    >
    > Thanks.
    > Nath.
    >
    >[/color]

    First create the database:

    mysqladmin create [database]

    mysql -u [user] -p [database] < [filename.sql]

    Where;
    * [user] is the username with the proper rights to create and import
    databases, for instance the root account
    * -p is added to prompt for a password
    * [database] is the name of the (just) created database
    * [filename.sql] is the filename of the SQL dump file.

    Good luck!

    Jonathan

    Comment

    • tradmusic.com

      #3
      Re: mysql back-up question - *.sql files?

      Thank you Jonathan.

      Please excuse my ignorance of MySQL, but our host company simply creates the
      database for us, and sends us the access details.

      I guess I'm therefore wondering how I upload the .sql dump file into it?
      <embarrassed face> :o) !

      Much appreciated
      Nath.

      "Jonathan" <jonathan@heela l.nl> wrote in message
      news:43a2e2b9$0 $10077$ba620dc5 @text.nova.plan et.nl...[color=blue]
      > tradmusic.com wrote:[color=green]
      >> Hi,
      >>
      >> Newbie question...
      >>
      >> If we want to transfer our database to a different host, how would we
      >> upload this .sql file into our new mysql database (on the new server)?
      >>
      >> Thanks.
      >> Nath.[/color]
      >
      > First create the database:
      >
      > mysqladmin create [database]
      >
      > mysql -u [user] -p [database] < [filename.sql]
      >
      > Where;
      > * [user] is the username with the proper rights to create and import
      > databases, for instance the root account
      > * -p is added to prompt for a password
      > * [database] is the name of the (just) created database
      > * [filename.sql] is the filename of the SQL dump file.
      >
      > Good luck!
      >
      > Jonathan[/color]


      Comment

      • Aggro

        #4
        Re: mysql back-up question - *.sql files?

        tradmusic.com wrote:
        [color=blue]
        > Please excuse my ignorance of MySQL, but our host company simply creates the
        > database for us, and sends us the access details.
        >
        > I guess I'm therefore wondering how I upload the .sql dump file into it?[/color]

        The same way you normally transfer files to a server. We use WinSCP for
        secure transfers if server supports ssh, but if that isn't available,
        there usually is FTP service (For example Filezilla can be used to
        transfer via FTP).

        Comment

        • Bill Karwin

          #5
          Re: mysql back-up question - *.sql files?

          "tradmusic. com" <tradmusic.com@ btinternet.com> wrote in message
          news:dnuqe0$e4b $1@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
          > Please excuse my ignorance of MySQL, but our host company simply creates
          > the database for us, and sends us the access details.
          >
          > I guess I'm therefore wondering how I upload the .sql dump file into it?
          > <embarrassed face> :o) ![/color]

          How do you upload any other file to the hosting company's servers? FTP?
          SCP? WebDAV?

          Once the .sql file is there, the hosting company probably has some web-based
          MySQL administration application, and the most popular one for this kind of
          situation is phpmyadmin. You need to confirm this with the hosting company.

          You should really be talking to your hosting company with these questions,
          since so much of the answer depends on how they set it up. Don't worry
          about appearing ignorant. It's no negative reflection on you that you don't
          know software that is new to you. You just don't know it _yet_.

          Regards,
          Bill K.


          Comment

          Working...