SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 56
  1. #26
    SitePoint Member
    Join Date
    Feb 2002
    Location
    Prince George, BC
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Sean...I'll try that as soon as I finish my lunch..

  2. #27
    SitePoint Member
    Join Date
    Feb 2002
    Location
    Prince George, BC
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Sean...E_U_R_E_K_a a a h ...Bingo...and all that stuff!

    This is the culprit "...(you may have to give the folder write permissions) ..."

    I checked permission many times in the (many) hours that I worked on this sucker... and I had write permission for the "owner" .. which I thought was enough! Wrong... Now I gave write permission to "other".. and that opened the flood-gates ("Open Sesame")

    I can't thank you enough...works like a charm!

    Kal

  3. #28
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont' do full path, try juist the folder.

    That's what I did, and it worked!

    Thanks,
    ~someonewhois

    P.S. Another nerd, eh?

  4. #29
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by someonewhois
    Dont' do full path, try juist the folder
    No, use the full path!

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #30
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why?

    With just the folder, it works...

  6. #31
    SitePoint Member
    Join Date
    Feb 2002
    Location
    Prince George, BC
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing but if you have the php file that you are dumping with in the same directory as the dump folder it's ok to use just the folder for the path...

    ... but if they're in different directories you need full path...Yes????

  7. #32
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, I went from "/" to "/backups/"!

    I used "backups" instead of "/backups"..

    Thanks,
    ~someonewhois

  8. #33
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now, any way to add a WHERE clause to it?

    Thanks,
    ~someonewhois

  9. #34
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not a query!

    As for using the full path - you are not dumping from your PHP script, you are running a command through the shell. You need to give the shell the full path to dump the file

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  10. #35
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you actually can add a WHERE. use the -w or --where option for mysqldump. see `mysqldump -?' for the syntax. i'm not exactly sure how it works, so don't ask me.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  11. #36
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, 2 things.


    1. Without full path it works, so I have no idea what you guys are talking about!

    2. So like this, DR_LaRRY_PEpPeR?:

    PHP Code:
    mysqldump --opt -uyour_username -pyour_password database_name tablename -wid='1' > /path/to/dump/file.sql 
    Where do I check mysqldump, the mysql manual? (Stupid me checked PHP manual and saw it wasn't there! )

    Thanks,
    ~someonewhois

  12. #37
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for info about mysqldump, like i said, run `mysqldump -?' from the command line (not from a script). this will tell you the options. or here's the page in the manual for it (same thing): www.mysql.com/doc/m/y/mysqldump.html

    i think the actual command would be

    Code:
    mysqldump --opt -uyour_username -pyour_password "-wid=1" database_name tablename > /path/to/dump/file.sql

  13. #38
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by someonewhois
    1. Without full path it works, so I have no idea what you guys are talking about!
    Tried it on Linux yet?

    Didn't know about the where thing! The manual has got this:

    "--where=user='jimf'" "-wuserid>1" "-wuserid<1"

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  14. #39
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!

    So:

    PHP Code:
    mysqldump --opt -uyour_username -pyour_password database_name tablename --where=id='1' > /path/to/dump/file.sql 

  15. #40
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried it?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  16. #41
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It makes the SQL file, but it's empty..

  17. #42
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a row with that id?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  18. #43
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A row?
    What do you mean?

    Somethign else?

    Yes, there's a name field..

    Thanks,
    ~someonewhois

  19. #44
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the sql file (wihtout the heading information)

    #
    # Table structure for table 'tabletest'
    #

    DROP TABLE IF EXISTS tabletest;
    CREATE TABLE tabletest (
    id int(11) NOT NULL auto_increment,
    name varchar(100) NOT NULL default '',
    PRIMARY KEY (id)
    ) TYPE=MyISAM;

    #
    # Dumping data for table 'tabletest'
    # WHERE: id=1
    #

    LOCK TABLES tabletest WRITE;
    UNLOCK TABLES;

    Hope that helps somewhat!

    Thanks,
    ~someonewhois

  20. #45
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you got a row (record, tuple or whatever you want to call it) with the id 1?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  21. #46
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    |id|name|
    |-------|
    |1 |test|
    It has a name field, filled in.

    That's it.

    Thanks,
    ~someonewhois

  22. #47
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so it's the where that doesn't work..

    Thaks,
    ~someonewhois

  23. #48
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any ideas on how to fix it?

  24. #49
    And your point is.... redgoals's Avatar
    Join Date
    Feb 2002
    Location
    Birmingham, UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try...

    PHP Code:
    mysqldump --opt -uyour_username -pyour_password database_name tablename "--where=id='1'" > /path/to/dump/file.sql 
    http://redgoals.com ... my site ... nuff said

  25. #50
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks for replying, but I just got it to work in another way!

    Thanks,
    ~someonewhois


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
  •