SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL-last updated? location?

    I have some MySQL db's on my system. On my php page I want to show when the db was last updated. Is there a way to get that timestamp? Also, where is the db file located? If I wanted to upload the database to a server, where would I find it in my dir structure? Thanks.

  2. #2
    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 can't see when a database was updated that i know of. however, you can see when a table was. use this query:

    Code:
    SHOW TABLE STATUS LIKE 'table'
    and look at the Update_time column.


    MySQL databases are directories in the data directory. to see where your data directory is, use this query:

    Code:
    SHOW VARIABLES LIKE 'datadir'

    BTW though, usually to "upload the database to a server," you have a dumpfile that you import with the mysql client. you don't usually manually copy the database files to the data directory.
    - 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

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thanks for the reply I really appreciate it. I already got the update time thing working thanks to you. Now I gotta read about dump files


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
  •