MySQL shell script to backup (dump) all databases
Submitted by greggles on
Have you ever wanted to create a backup (aka dump) file of all databases on a server on a regular basis.
Well, here's an easy way to do that:
Broadly defined "technology" e.g. software, water pumps
Submitted by greggles on
Have you ever wanted to create a backup (aka dump) file of all databases on a server on a regular basis.
Well, here's an easy way to do that:
Submitted by greggles on
Let's say you need to drop all tables in a mysql database. How do you do that?
You could use a gui, but that's not fun.
You're a shell jockey so you want a commandline:
mysql -u uname dbname -e "show tables" | grep -v Tables_in | grep -v "+" | \ gawk '{print "drop table " $1 ";"}' | mysql -u uname dbname
(that's all one line, but if I do it as a line then it screws up my theme - go figure).
This assumes that you are running in passwordless mode. See "man mysql" for tips on how to pass in passwords in another manner.
What this does is
Submitted by greggles on
I was recently sent a link to this petition from MoveOn.org and asked what I thought about it. I'll quote a section from the petition:
Use the public airwaves for the public good, or turn them over to big companies who will stifle competition, innovation, and the wireless Internet revolution. We're urging the FCC to mandate that whoever wins the auction cannot stifle competition and innovation.
First, I generally dislike MoveOn.org because they water down the issue into platitudes so that you have to agree with their position in the petition. Who wants to support anticompetitive regulations? Who wants to stifle innovation? Obviously I should be in favor of their position, right? But they water down the issue in such a way that you can't research it either the issue or their actual position. What is the issue? What is their actual position on the issue?
I don't know so, here's what I have to say in broader terms.
When it comes to geek topics, the place that has the best articles, news, and commentary weighing boths sides is generally slashdot. I went to their page for Communications Articles which shows this was discussed exactly zero times over the last 30 articles which goes back to December of 2006. So, not discussed at all. MoveOn doesn't scoop slashdot. So this is apparently unimportant to slashdot which means I don't care either.
Submitted by greggles on
With PC World declaring Microsoft Demands Royalties for Open-Source Software we've now got a repeat of the RIAA's sue our customers strategy!
Submitted by greggles on
Let's say that you are running a command on a linux shell and it's taking a long time. Further, you need to disconnect your session to get on the bus or your session gets disconnected because your net connection is flakey.
Imagine if you could just disconnect from your shell session and then reconnect. Well, you can :)
Submitted by greggles on
I recently attended a training that Kevin Kempter hosted. It was a really great two night session aimed at experienced DBAs/Developers so that they could learn PostgreSQL. Kevin has a lot of experience with postgres and wanted to help share that experience with other folks. He's finding a growing need for PgSQL developers in the Denver area and wants to build up a user group and network here so that companies deciding whether to use PostgreSQL or not will see an available local talent pool here in Colorado.
Submitted by greggles on
The other day I broached the idea of a security bounty in the Drupal project. I had first heard about this concept from the Mozilla Foundation's Security Bug Bounty which appears to be the most famous of these.
This is pretty simple:
This concept seems to me like it could be generalized for any software project. Here are the rules I came up with, based upon the Mozilla foundation's rules.
<
ul>