As per redis home
page,
"Redis is an open source (BSD licensed), in-memory data structure
store, used as database, cache and message broker. It supports
data structures such as strings, hashes, lists, sets, sorted sets
with range queries, bitmaps, hyperloglogs and geospatial indexes
with radius queries."
Redis Installation Steps:
I am trying the below steps in an ubuntu 14.04 system. Open the
terminal and issue the below commands:
1. Get the latest tar zip for redis (http://redis.io/download)
$ cd /path/to/download/directory/
$ wget
http://download.redis.io/releases/redis-3.0.7.tar.gz
2. Untar it and issue below commands:
$ tar xf redis-3.0.7.tar.gz$ cd redis-3.0.7$
make$ sudo …
If you are starting out on the MySQL command line client, you might be interested in the following information.
When you use the MySQL command line client, it is often useful to log the commands you enter and the response you receive back from the MySQL server. The MySQL 'tee' command allows you to do this very simply and conveniently. Just enter 'tee' followed by the path to the file you want to log the session to (normally referred to as the 'tee' file). From that point on, all your session activity is logged to that file. To cancel tee file logging, just execute 'notee'.
To learn more about getting started on the MySQL Database, take the MySQL for Beginners training course. You can take this 4-day course through the following delivery …
[Read more]
Many out there will have different ideas about this, some using
procs, some using a function, others using a shell script. Well I
didn’t want to spend much time on it so decided a
group_concat(concat would be enough.
There is no genius, rather laziness :) but what if you have a
hundred databases and you want to drop them all?
mysql Thu Mar 3 13:50:06 2011 > pager sed 's/,/ /g' PAGER set to 'sed 's/,/ /g'' mysql Thu Mar 3 13:50:32 2011 > select group_concat(concat('drop database ',SCHEMA_NAME,';')) from information_schema.schemata where SCHEMA_NAME !='mysql' and SCHEMA_NAME !='information_schema'; +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | group_concat(concat('drop database ' SCHEMA_NAME ';')) …[Read more]
Strangely enough, select *,colname from tbname;
works just fine, whereas select colname,* from
tbname;
fails! So if you would like to see all columns,
but have one or more of them displayed to the left of the set,
you have only one way left to do it ‘comfortably’:
select colname,tbname.* from tbname;
well two really
but this is really the same
select colname,tb.* from tbname tb;
Because Sharing is Caring
I want to highlight the importance of reviewing mysql’s initial
set of accounts.
Say you have a mysql on abc.def.ghi.jkl running on port 3306
anonymous account with privileges without a password, then:
1. mysql (if issued on localhost)
2. mysql -h abc.def.ghi.jkl
3. mysql -u ” -h abc.def.ghi.jkl
4. mysql -u ” -h abc.def.ghi.jkl -P 3306
5. mysql -u user_which_does_not_exist -h abc.def.ghi.jkl
will all manage to get into mysql given the way mysql authenticates users is against your username and client host from where you are connecting.
This verification is done versus the following columns in the
mysql.user table, i.e., User,Host and Password columns.
An entry in the mysql.user table with the following values
User=”, Host=’%’ will accept ANY user connecting from ANYWHERE in
the world, thus disabling ANY security. Hence the reason for this
blog post highlighting the importance …
I am publishing my MySQL related bookmark collection http://www.mysqlpreacher.com/bookmarks/.
Feel free to send me links you think might be good to add in order to help others.
Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back?
Cheers,
Darren
Just a small
note to advise that Securich reached 0.1.4.
Some new tools include:
* Added Password complexity
* Enhanced `set_password` – Old password is now necessary to
replace it by a new one
* Enhanced Revoke privileges to accept regexp
* Added Block user@hostname on a database level
* Added Creation of reserved usernames
* Added Help stored procedure displays help for each stored
proc
* Enhanced `create_update_role` to include the removal of
privilages from roles
* Enhanced `grant_priveleges` on `alltables` for a database
without tables would terminate with an error instead of
gracefully (now fixed)
* Added Restore user@hostname on a database level
* Removed ’show warnings’ from sql installation
The database design using workbench is also available in the db folder (for easier understanding of what lies …
[Read more]It”s not the most common task in the world, but you might want to view processes from a particular user and once in a while you might even need to kill processes from a single user, be it during an attack or because you simply got a bug in an application bombarding your db server with connections!
Here is a small stored procedure which does exactly that!
call process_list("show","username","hostname");
– shows all processes owned by username@hostname
call process_list("kill","username","hostname");
– kills all processes owned by username@hostname
The code for this stored procedure can be found below. If you have any comments / suggestions feel free to comment below.
######################################################################
##
…
Earlier this year I had published a small blog about being efficient when using mysql prompt. This is a small continuation of it highlighting a couple of other cool features which I really find very useful when working command line (i.e. always!). The first I’m gonna list here is setting the prompt itself by typing –
\R [...]
A few interesting KPIs about certified people and their current location (the fact that many people travel from one country to the other for work is very popular these days especially in the IT sector): Before starting to read, I am hereby assuming the MySQL list of MCDBAs is on a residence basis not citizenship. There are [...]