Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation help with changing mysql on new host [was: Serious Help Needed]

    Hi

    A friend of mine set up a mySql database for me a while ago and i have been maintaining what he built for some time. Due to issues with bandwidth i have had to transfer web hosts. So i need to transfer what i have into the new panal.

    Sounds easy - as i say im a complete novice and am struggling. My new host have given me new passwords for my mySql database and i have an SQL dump of my old database.

    I am starting completely from the absolute beginning on the new database and using things for the very first time. What do i do?

    Peter
    --
    Peter Potter
    PSP Wallpapers

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    do you have phpmyadmin? or shell access?

    with the former there should be an 'import' option, with the latter:
    Code:
    mysql --user=username --host=hostname --password dbname < dump.sql
    (replacing username and hostname, and dump.sql and then type your password at the prompt)
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #3
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply. I am using c panal. On the page i am looking at i have 2 things to do.

    1 Create a Data base >> Im guessing that the new name doesn't really matter as long as i change in my web coding.

    2 Create a user name and password >> Does this need to be the new user name and password i have been given by my new host, and again im guessing i need to change this in my web coding.

    Do i need to do anything different from the above? Do i need to create the database here first. If not i move onto phpmyadmin section. This has a section called "Import".

    Does it sound like im on the right track?

    Peter
    --
    Peter Potter
    PSP Wallpapers

  • #4
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ihave set up the user name and password, but not created the database.

    I then try and import the SQL Database and it throws up this error

    MySQL said:

    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci' at line
    If this helps you help me. Many thanks in advance.
    --
    Peter Potter
    PSP Wallpapers

  • #5
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I sorted this in the end. My issue was because i was tryign to import the CSV file exactly how it was showing in the database on my previous site. A friend helped me and deleted some of this and it worked.

    Peter
    --
    Peter Potter
    PSP Wallpapers


  •  

    Posting Permissions

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