Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ssh/telnet and mysql

Options
  • 23-04-2002 3:12am
    #1
    Registered Users Posts: 15,439 ✭✭✭✭


    Recently moved a phpBB2 board to a new domain (bandwidth reasons) and had to restore the sql database , to keep posts, users etc.

    The new host has phpMyAdmin, but the database size is about 4mb, and it seems that phpMyAdmin doesnt like connections that last over 30 seconds...ftping 4 mb in 30seconds over 56k is just not possible..

    In the end i just copied and pasted the whole lot in to the phpMyAdmin window and ran a query that way, which worked, but all the dates of posts were recoded as Jan 01 1970, which was a bit boring.

    Reading up on this it seems that for databases over a couple of mb, telnet is the way to go..

    I can't use the admin panel database backup option and I don't have phpMyAdmin. Can I still backup and restore?

    Yes, but only if you have telnet access to your server. From the command-prompt, do the following:
    >mysqldump -u USERNAME -p DATABASE_NAME >backup.sql

    Now copy the resulting backup.sql file to the new server location and import it again with:
    >mysql -u USERNAME -p DATABASE_NAME < backup.sql

    USERNAME is the mysql username for your database
    DATABASE_NAME is the mysql database name of the phpBB database


    I do have telnet access(its an option in the hosts control panel..have no idea how to use it properly), but tbh, i haven't a bog what i'm doing.

    Can someone help out here? , would really like to know this should the need arise to restore again.

    Thanks.

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



Comments

  • Registered Users Posts: 476 ✭✭Pablo


    get this
    http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

    as in download it

    they open it

    select the telnet port and the address of your server , the same one you use for ftp'ing

    enter username and passwd when prompted , the same when you are ftp'ing.

    then you will have a command prompt and that mysql opening command should work for you .


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Controlling MySQL via Telnet or SSH (does your host allow telnet? - very bad idea!) is not an easy matter.
    I would urge you to read the 'man' pages and maybe also look at this: http://www.devshed.com/Server_Side/MySQL/Intro/page2.html

    If your former host allows it, you might be able to get a nice dump of the database(s) and then you could pull them across to the new server using wget (eg. wget http://somedomain/somefile) It's a hell of a lot easier than trying to migrate via a 56k modem!

    Before you pull the original database across you might want to do some 'spring cleaning' - I'm not familiar with the structure of phpBB, but it probably has click logs etc., which aren't entirely necessary and might be using up a lot of space.

    Best of luck!


  • Registered Users Posts: 15,439 ✭✭✭✭Supercell


    Thanks Pablo and blacknight, going to have a play around with both options this evening on a test board .

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



  • Registered Users Posts: 7,739 ✭✭✭mneylon


    If you are still having problems, let us know!


Advertisement