SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just finishing up a PHP and my first MySQL driven site.

    Just wondering, what is the most efficient way to move the MySQL data from the machine I'm developing on (Win2K) to the MySql database on my hosting services server?

    Thanx

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First dump the database to a file. To do this go to the command prompt and then type

    C:\>C:\pathtomysql\bin\mysqldump - username -p dbname > C:\pathtowheretostorethefile\dbname.sql


    Now upload that file to your server create the database on your server then telnet/SSH in to your server and issue this

    $>mysql -u username -p dbname < /path/to/dbname.sql


    Thats it
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, thanks. But, I'm assuming that there isn't anything that will build the tables for me on the remote server.

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes after you run mysqldump on your computer open the file and have a gander it actually rebuilds the tables and inserts the data. So yes it does automatically create the tables on the new server. All you have to do is create the database.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This worked great. Only problem I had was a FULLTEXT search field. After a while of pulling my hair out I found out that my hosts server is running an older version of MySql that doesn't support it.

    Otherwise, went smooth.

    Thanks again!


Bookmarks

Posting Permissions

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