Results 1 to 4 of 4

Thread: simple mysql question

  1. #1
    Join Date
    Jul 2005
    Location
    Jevnaker, Norge
    Beans
    74

    simple mysql question

    OK.. i've got one simple question.. when running a mysq query throught ssh, how do i know if it all went well?

    The reason I'm asking is I have a 700MB backup witch I try to restore..

    After running
    Code:
    mysql -u root -p >sqlfile.sql
    I get a blank line, and I'm unsure if it's finished, working or what...
    "There's this thing called being so open-minded your brains drop out." --Richard Dawkins

  2. #2
    Join Date
    Jul 2006
    Location
    somewhere :)
    Beans
    535
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: simple mysql question

    Quote Originally Posted by SSamiK View Post
    OK.. i've got one simple question.. when running a mysq query throught ssh, how do i know if it all went well?

    The reason I'm asking is I have a 700MB backup witch I try to restore..

    After running
    Code:
    mysql -u root -p >sqlfile.sql
    I get a blank line, and I'm unsure if it's finished, working or what...
    to pass commands in a text file to mysql, as far as i know you have to enter the following:
    Code:
    mysql -u USERNAME -p < NAME_OF_THE_FILE
    and then the mysql-password for USERNAME. In your code the arrow is pointing the wrong way.

    One thing you can always do is open a shell connection to the server. You can do this by just entering the following:
    Code:
    mysql -u USERNAME -p DATABASE_NAME
    and then the mysql-password for USERNAME. Then you can look around the data in the database using standard mysql commands (e.g. 'SELECT * FROM table;')

    I hope this helps
    there are 10 types of people in the world: those that understand binary and i don't know who the other F are.

  3. #3
    Join Date
    Jun 2009
    Beans
    8

    Re: simple mysql question

    howlingmadhowie, you are correct. Here is a link that covers this: MySQL backup and restore commands (from the shell).

  4. #4
    Join Date
    Jul 2005
    Location
    Jevnaker, Norge
    Beans
    74

    Re: simple mysql question

    OK.. thanks you guys! I've got it going now, just have to wait. Guess it will take some time processing 700MB of database backup.
    "There's this thing called being so open-minded your brains drop out." --Richard Dawkins

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •