Results 1 to 2 of 2

Thread: Relocating a mySQL database

  1. #1
    Join Date
    Feb 2003
    Location
    Spain
    Posts
    1

    Relocating a mySQL database

    I'm preparing a db project using mySQL. It's running on my Win98 machine with Apache 3.something. I've written a
    fairly simple HTML form that calls a CGI script in Perl to search the db. Everything works just fine BUT:

    mySQL insists I keep the database in its directory (c:/mySQL/data/, as it's set up here). I want to move the data elsewhere (let's say to c:/project/). There seems to be no way to do this - putting a full path name in the CONNECT statement doesn't work. Any ideas?

    (I want to solve this so that when I upload the project to a 'real' Web server, I can keep the db where I can
    get at it easily.)

    Peter.

  2. #2
    Join Date
    Feb 2003
    Location
    Johannesburg, South Africa
    Posts
    145

    Post

    Have a look here: http://www.mysql.com/doc/en/Command-line_options.html

    Also, when moving your data from one site to another, I recommend a tool like mysqldump to dump the data. You can use the mysql command line tool on the other end to import the data again.

    Another handy way to do this is with phpMyAdmin

    Best of luck.

Posting Permissions

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