Showing entries 30171 to 30180 of 45394
« 10 Newer Entries | 10 Older Entries »
Get to MySQL data directory on Ubuntu

I’ve been asked about this and realized that it may not be obvious to people who are more familiar with Windows than with Ubuntu. So here is a tip.

When learning MySQL on Ubuntu, it is helpful to be able to get to MySQL’s data directory and observe file creation and modification while you are performing database and table creation and modification, index creation and modification, etc. You can find out MySQL’s data directory by running:

show variables like ‘datadir’;

Suppose your datadir is /var/lib/mysql. And suppose you have a database called test. After opening a terminal window and type:

cd /var/lib/mysql/test/

You will likely receive an error like below:
bash: cd: /var/lib/mysql/test/: Permission denied

Now if you try the command below, as it seems logical on Ubuntu

sudo cd /var/lib/mysql/test/

You will likely get this message:

sudo: cd: command …

[Read more]
FriendFeed room, identi.ca group, for MySQL

Executive summary: There is now a MySQL Room on FriendFeed, as well as a identi.ca group for mysql. Community members, developers, dabblers, users, etc. should find these extra avenues useful, in addition to the forums, mailing lists, and even the Forge. Join them now!

There has been a recent uptake of Twitter amongst the MySQL community… Early adopters have been around for ages, even (as we’re slowly approaching Twitter’s third birthday).

However, I’ve been noticing that slowly, …

[Read more]
Some Tricks used by the Linux kernel

Linux kernel uses a number of advanced keywords, macros, and extensions to C language. Here is a description of some of these keywords, macros and extensions that I found troublesome to understand and had to investigate a little bit in order to understand them.

I have used kernel versions 2.4.18 or 2.6.0 for this tutorial.

maximum number of columns (hard limit)

#define MAX_FIELDS 4096 /* Limit in the .frm file */

I should be able to remove this limitation soon. Although if you come anywhere near it, you probably have already lost (and written your own engine).

Fix for Debian/InnoDB Problem

Baron was just writing about problems with the Debian init scripts. The basic problem boils down to /etc/mysql/debian-start running mysqlcheck on every table.

Kolbe Kolbe and Harrison Fisk pointed this  out to me last February, and as a result I re-wrote the debian-start.inc script to only operate on MyISAM tables. Additionally, the default config was changed to turn on the myisam-recover option, so even for the MyISAM tables, all we do is touch the table to get MySQL to recover it if needed. (Which I promise you, you really want if you're modifying MyISAM tables on a production server. Don't do that, really, but that's another issue.) The new process essentiall looks like this:

for table in `select TABLE_NAME from information_schema.TABLES where ENGINE='MyISAM'":
  select count(*) into …
[Read more]
Fix for Debian/InnoDB Problem

Baron was just writing about problems with the Debian init scripts. The basic problem boils down to /etc/mysql/debian-start running mysqlcheck on every table.

Kolbe Kolbe and Harrison Fisk pointed this  out to me last February, and as a result I re-wrote the debian-start.inc script to only operate on MyISAM tables. Additionally, the default config was changed to turn on the myisam-recover option, so even for the MyISAM tables, all we do is touch the table to get MySQL to recover it if needed. (Which I promise you, you really want if you're modifying MyISAM tables on a production server. Don't do that, really, but that's another issue.) The new process essentiall looks like this:

for table in `select TABLE_NAME from information_schema.TABLES where ENGINE='MyISAM'":
  select count(*) into …
[Read more]
MySQL AES Encryption Compatability

So what happens if you want to use the mysql functions AES_ENCRYPT / AES_DECRYPT to handle data encryption, but you might also need to write a tool that takes the encrypted data and accesses or updates it outside of the database? This operation can be hit or miss depending on your library's implementation of how it handles the encryption key passed to the actual encryption function. There is no standard on how this is handled.

AES only defines that it accepts an encryption key of AES_KEY_LENGTH/8 bytes. So for 128 bit encyption you need to give it a 16 byte key.

In mysql you can do:
AES_ENCRYPT('mykey','here is a string to encrypt');

But we just passed it a 5 character string, where does the 16 byte key come from? This is the part that can differ between libraries. MySQL takes your string and converts it like this:

static int my_aes_create_key(KEYINSTANCE *aes_key,
enum …

[Read more]
Fix for Debian/InnoDB Problem

Baron was just writing about problems with the Debian init scripts. The basic problem boils down to /etc/mysql/debian-start running mysqlcheck on every table.

Kolbe Kolbe and Harrison Fisk pointed this  out to me last February, and as a result I re-wrote the debian-start.inc script to only operate on MyISAM tables. Additionally, the default config was changed to turn on the myisam-recover option, so even for the MyISAM tables, all we do is touch the table to get MySQL to recover it if needed. (Which I promise you, you really want if you're modifying MyISAM tables on a production server. Don't do that, really, but that's another issue.) The new process essentiall looks like this:

for table in `select TABLE_NAME from information_schema.TABLES where ENGINE='MyISAM'":
  select count(*) into …
[Read more]
Windows PowerShell command line shell execution policies

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.

How to set permissions to run PowerShell Scripts?

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.

Showing entries 30171 to 30180 of 45394
« 10 Newer Entries | 10 Older Entries »