Category Archives: Databases

MySQL enumeration, strict mode and the troubles of debugging

Suppose you have a MySQL table containing an enum column. The enumeration allows the values “FOO”, “BAR” and “BAZ”. This is a production database, hooked up by a quite huge amount of programs inserting and deleting rows into that table. Now suppose that, for some reason, one of these programs tries to insert the value [...]

Error 1044 in MySQL: Access denied when using LOCK TABLES

I got an error while using mysqldump mysqldump: Got error: 1044: Access denied for user x@y to database z when using LOCK TABLES To solve this problem, either ask you administrator to grant you the lock privileges, or use the following command instead. mysqldump -u username -p database –single-transaction >dump.sql This is the help entry [...]

Change MySQL config file

It seems trivial, and indeed it is, to specify a different configuration file for the mysql client, from the standard .my.cnf to a different file. This is generally needed when you don’t want the password to be visible in the process list, but at the same time you don’t want to use the standard .my.cnf [...]

Table namespacing in databases

I was trying to find out if some database implements namespacing for tables, but it looks like google produces no useful results for it. This is strange. In MySQL, tables are namespaced on a “database qualification” (like in dbname.tablename), but it is not possible, as far as I am able to see, to define dbname.namespacename.tablename. [...]