SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict richard_h's Avatar
    Join Date
    May 2002
    Location
    London
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    dump schema with mysql

    Does anybody know how PhpMyAdmin creates the dump schema for a database?
    I understand it's achievable with a bash shell script, using the mysqldump command.

    The reason I ask is because I like the idea of incorporating a database backup utility on future CMS, and I don't really want the client to have access to PhpMyAdmin.
    Any assistance would be grateful.

  2. #2
    SitePoint Evangelist cyngon's Avatar
    Join Date
    Aug 2001
    Location
    Livonia, MI, USA
    Posts
    513
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpMyAdmin is open-source so I would suggest just popping the hood on it and taking a look.

    Ah, the joys of OSS.

  3. #3
    SitePoint Addict richard_h's Avatar
    Join Date
    May 2002
    Location
    London
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Point taken.
    I think with time restrictions www.phpmybackup.com looks like quite a nifty tool to use and customize.

  4. #4
    SitePoint Addict richard_h's Avatar
    Join Date
    May 2002
    Location
    London
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If anyone is interested the 'SHOW CREATE TABLE' sql statement seems to do the donkey work when producing backup schema data.

  5. #5
    SitePoint Evangelist cyngon's Avatar
    Join Date
    Aug 2001
    Location
    Livonia, MI, USA
    Posts
    513
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm. I'm having trouble getting SHOW CREATE TABLE to work.

    I did the following:

    Code:
    use myDB;
    SHOW CREATE TABLE myTable;
    ERROR 1064: You have an error in your SQL syntax near 'create table myTable' at line 1
    Any idea what's wrong?

  6. #6
    SitePoint Addict richard_h's Avatar
    Join Date
    May 2002
    Location
    London
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of mySQL are you running? apparently this statement won't run in 3.22.32.

    I'm working with 3.23.33.

  7. #7
    SitePoint Evangelist cyngon's Avatar
    Join Date
    Aug 2001
    Location
    Livonia, MI, USA
    Posts
    513
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That explains it. I'm running 3.22.32.

    The joys of Debian. Everything is stable. Everything is way outdated.


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
  •