Generate useful test data and random dates in MySql. All code and tables are provided.
10 Older Entries »
A short MySql function to generate a Lorum Ipsum text. You can download the code in the zip file below.
You can use this MySQL function to generate names, (e-mail)addresses, phone numbers, urls, bit values, colors, IP address, etc.. As usual, the code is provided in a zip and the code is fully documented.
Taxonomy of Database Tools
In the MySQL ecosphere there is an ecosystem of tools. Like real-world ecosystems, the “creatures” in the MySQL tools ecosystem can be classified and organized by a taxonomy. There are already multiple taxonomies of software bugs (e.g. A Taxonomy of Bugs), but as far as I know this is the first Taxonomy of Database Tools. A taxonomy of database tools serves useful purposes, as discussed in the previously linked page. For me, the most useful purpose is the high-level ecosystem view which I use to compare MySQL tools to …[Read more]
Skip to the 2nd part for the code snippet.
Its an important matter of security to enforce complex passwords that have a sufficient length. From personal experience, if you ask a normal user to create their own passwords, their passwords will be based on a character set consisting of 36 case-insensitive alphanumeric characters: a-z, 0-9 instead of the full 94 character set typable on all keyboard layouts. Also, most normal users would use dictionary based passwords with a predictable pattern: dictionary words at the beginning and numbers at the end.
Relying solely on the client-side or front-end to enforce the creation of passwords of at least 8 characters long and the use of …
The easiest way to generate random rows in MySQL is to use the ORDER BY RAND() clause. SELECT col1 FROM tbl ORDER BY RAND() LIMIT 10; This can work fine for small tables. However, for big table, it will have a serious performance problem as in order to generate the list of random rows, MySQL […]
Some days ago I was working in a vocabulary game and dictionary. The dictionary contains 1,10,000 words and meanings. I developed a vocabulary game where I had to randomly choose 10 words out of 1,10,000 dataset. Here I’m describing the possible solutions for retrieving 10 random words from 1,10,000… Read Full Article
This is far from deeply technical but little things that should
be simple but aren’t annoy me. I found that MySQL
--prompt_body don’t “just work.” I wanted the prompt
mysql \v> . So I tried:
make_sandbox_from_source /mysql/src/mysql-4.0.30 single --prompt_body=' \v> '
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `make_sandbox /mysql/src/mysql-4.0.30/4.0.30 --prompt_body= \v> '
Maybe my shell knowledge is more terrible than I realize so I verified that ‘
\v> ‘ does not need special
echo ' \v> '
Ok, so clearly it’s the fault of
make_sandbox_from_source. I tried and tried to do
this on the command line but …
There’s very few spots left for attending OpenSQL Camp 2009. I’m going, along with several other Percona employees. It’s fun stuff; you should go. I’m not really the social type so I’ll probably be sitting off to the side somewhere coding.
10 Older Entries »