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.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

ssh/telnet and mysql

  • 23-04-2002 02:12AM
    #1
    Registered Users, Registered Users 2 Posts: 15,805 ✭✭✭✭


    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.


Comments

  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 7,742 ✭✭✭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, Registered Users 2 Posts: 15,805 ✭✭✭✭Supercell


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


  • Registered Users, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


    If you are still having problems, let us know!


Advertisement