SSH database commands

Discussion in 'Site & Server Administration' started by Whitey, May 28, 2008.

  1. #1
    Hey

    I ordered by dedi on saturday and when I got it a few days ago I installed torrentflux. I don't have a control panel so I used SSH to make the database and load the SQL files into it. It seemed to work okay, but when I try and use torrentflux it just gives me a blank page.

    Apache is running, so is PHP, and MySQL, and Python. So I think it's something to do with the database.

    Can anyone tell me the SSH commands to read whats inside the database? Or where the database files are stored in sftp?

    Cheers!:D
     
    Whitey, May 28, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    It won't help reading the raw database files. You'll need to use the "mysql" command after logging in. Like this:

    mysql -u <username> -p<password> <database>
    (no space after the "-p")
    Code (markup):
    This will take you to the mysql prompt where you can run your queries.

    Also, you might want to check out Apache's error logs to see what the issue might be.
     
    boltok, May 28, 2008 IP
  3. rootbinbash

    rootbinbash Peon

    Messages:
    2,198
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #3
    google > man mysql

    But you should get a panel especially cpanel.
     
    rootbinbash, May 28, 2008 IP
  4. roy.laurie

    roy.laurie Peon

    Messages:
    51
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've never been a fan of the -p flag. You're putting a plaintext password in your ~/.bash_history. =(
     
    roy.laurie, May 30, 2008 IP
  5. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #5
    Same here. I always leave the "-p " without specifying the password on the command line and enter it at the prompt. However, most instructions and HOWTOs tell you to use it with the password and I didn't want to confuse anyone.
     
    boltok, May 30, 2008 IP
  6. Nick_Mayhem

    Nick_Mayhem Notable Member

    Messages:
    3,486
    Likes Received:
    338
    Best Answers:
    0
    Trophy Points:
    290
    #6
    Nick_Mayhem, Aug 10, 2008 IP