Uploading MySQL Database?

DOSMANDOSMAN Grand Rapids, MI
edited October 2003 in Internet & Media
I'm a real n00b at MySQL and I'm just barely making my way by.


But I have managed to set up a database just how I want it on my local pc.

My question:
How do I upload it to my web host's server?

Comments

  • ShortyShorty Manchester, UK Icrontian
    edited October 2003
    Open a DOS window..

    Navigate to your MySQL database folder (normally under Windows.. it's C:/mysql/bin

    Type:

    mysqldump --opt -uroot -p yourdatabasename > yourdataname.sql

    Replace yourdatabasename by the name of your database :)

    It will then prompt you for your root SQL password. Enter it and you will have an SQL dump.

    Upload to your remote server. Then create the remote database name if you have the option. Some hosts provide you a database already created.

    At the command line.. type

    mysql -uusername -p createddatabasename < yourdatabasename.sql

    Substitute username for your remote server database username, replace creatededdatabasename with the datbase name provided by your host.

    That is a basic overview. If it makes no sense, drop me a PM as you don't want to go publishing database user/passes in public ;)
  • a2jfreaka2jfreak Houston, TX Member
    edited October 2003
    I think Shorty covered it.

    Good seeing you back on S-M DOSMAN. You stay away too much.
  • DOSMANDOSMAN Grand Rapids, MI
    edited October 2003
    mysqldump: Got error: 1045: Access denied for user: 'root@localhost' (Using password: YES) when trying to connect
    


    What'd I screw up?
  • DOSMANDOSMAN Grand Rapids, MI
    edited October 2003
    Ok, I think that I forgot my local password. :shakehead

    How do I reset it? I uninstalled/reinstalled but it didnt do anything.
  • DOSMANDOSMAN Grand Rapids, MI
    edited October 2003
    Oh never mind. Ha, i had NO password. No wonder none of my normal ones worked.
  • ShortyShorty Manchester, UK Icrontian
    edited October 2003
    Glad u got it :)

    Need any help with the remote side.. let me know via PM :)
  • DOSMANDOSMAN Grand Rapids, MI
    edited October 2003
    Shorty is the greatest!!

    My problem has been resolved
Sign In or Register to comment.