SQL tools

User avatar
spaceman
Posts: 79
Joined: Sun May 31, 2009 10:08 am

SQL tools

Postby spaceman » Tue Aug 28, 2012 6:56 am

I am so going to break everything. :mrgreen:

I'm looking for a tool(s) to open my SQL backups (for example: localhost.sql, the default name for the backup of my whole, live SQL database). Once 'open' I'd like to be able to export tables to .sql (or other) for importing back to the live database at a later stage. I'm looking for an 'offline' tool like phpmyadmin, so I can query, view and edit sql backups.

I have a feeling I don't know what I'm asking, but that's cool. Ideally, I would open localhost.sql in a text editor and cut and paste the bits I needed, but the damn SQL files won't open in gedit! :lol: Next time I will backup to csv files. Then I can poke around in the code.

Many thanks.
myHDA: TranquilPC BBS ~ Intel Atom D510 1.66 GHz ~ 4GB DDR2 RAM ~ 3TB Data Storage [RAID5]

User avatar
spaceman
Posts: 79
Joined: Sun May 31, 2009 10:08 am

Re: SQL tools

Postby spaceman » Tue Aug 28, 2012 9:31 am

LOL it's far from ideal but I can open this mother of a file in Kate. :mrgreen:

Of course it had to wrap two very long lines which will break the file if I try to save it, but this is (a small) start. Other advice on appropriate tools/editors most welcome.
myHDA: TranquilPC BBS ~ Intel Atom D510 1.66 GHz ~ 4GB DDR2 RAM ~ 3TB Data Storage [RAID5]

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: SQL tools

Postby bigfoot65 » Tue Aug 28, 2012 1:36 pm

If you use a Windows Client, Notepad ++ is a good editor.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
spaceman
Posts: 79
Joined: Sun May 31, 2009 10:08 am

Re: SQL tools

Postby spaceman » Thu Aug 30, 2012 4:14 am

Cheers, Bigfoot (I wonder if I can run Notepad++ in Wine?)

I did succeed in opening the files and editting them in nano, sadly saving them broke them. I suspect that had something to do with two lines having more than 1024 characters. This is going to be fun. Ta. ;)
myHDA: TranquilPC BBS ~ Intel Atom D510 1.66 GHz ~ 4GB DDR2 RAM ~ 3TB Data Storage [RAID5]

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: SQL tools

Postby bigfoot65 » Thu Aug 30, 2012 5:09 am

It may run in wine, not sure. I would imagine there is an editor for Linux that could handle large files. Might try searching the internet.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
spaceman
Posts: 79
Joined: Sun May 31, 2009 10:08 am

Re: SQL tools

Postby spaceman » Fri Sep 07, 2012 10:35 am

Thanks BigFoot, Notepad++ worked a treat. It also run, reasonably well, through Wine.

SQL files are actually straight-forward in layout, so I can recommend that people open them up and manipulate them directly with a good text editor. MAKE BACKUPS FIRST. :mrgreen:

Cheers!

I wrote a wordpress sql databse hacking guide here. Would it be any use in the wiki?
myHDA: TranquilPC BBS ~ Intel Atom D510 1.66 GHz ~ 4GB DDR2 RAM ~ 3TB Data Storage [RAID5]

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: SQL tools

Postby bigfoot65 » Fri Sep 07, 2012 11:03 am

Sure, you can make it a generic guide using WordPress as the example.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 48 guests