Jump to Navigation

Recently created

MySQL limitations

I am writing some queries and stored procedure on MySQL these days. Coming from an Oracle background that can be somewhat frustrating at times. Some query constructs are not available, but also the procedural language is quite limited compared to PL/SQL.

I must say, most limitations are well documented. That means that at least you have some closure when things do not work out. Examples I encountered are:

Openconnect: using your own DNS

Symptoms

After setting up a VPN using Openconnect, local sites stop resolving.

Solution

Stop using the DNS server belonging to the VPN; instead, use your own DNS server and hardcode servers you want to reach through the VPN in your /etc/hosts file.

Trying to contribute

One of the nice things about Open Source programs is that you can squash the bugs that bite you. Of course, not everyone is able to do that, but still. And though there is no obligation to do so, it is nice if you share your patches with the rest of the world.

Sometimes, though, the sharing part just does not work out. I recently encountered two such cases, where I tried to do the right thing but my patches will probably never be used.

MySQL: Clean shutdown

You want to shutdown MySQL as cleanly as possible, perhaps because you want to create backups or want to do an upgrade.

Assumptions

  • You are running MySQL 5.5 or later

Procedure

If possible, stop all incoming connections (for example, from application servers).

On a slave or replication server, stop the I/O thread (which grabs updates from the master) and wait for the SQL thread to process all:

MySQL: Setting up replication

This is a simple guide to setting up replication between MySQL servers.

Assumptions

  • You are using MySQL 5.5 or later;
  • The master server is currently not being used and is not yet configured to use binlogs;
  • The slave server contains a perfect copy of the master server databases.

Procedure

On the master side, make sure the following statements are included in the /etc/my.cnf file:

MySQL: Identify invalid views

Symptoms

When querying a MySQL view, or when dumping a MySQL database, you get an error including the following text:

View ... references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

A MySQL dump stops at that point.

You want to identify those views that return this error through a database query.

Udev: resolve a changed MAC address

Symptoms

After changing the MAC address (Ethernet address) of your network adapter, it does not get an IP address. This can happen within a virtual machine or when replacing the network card in a physical machine. If you try an ifconfig -a or an ip addr list, you see that the name of the network card has changed (for example, from eth0 to eth1).

Certificate headaches

Creating and managing PKI certificates is always tricky. A small list of what went wrong today when following my own guide for importing your own Oracle Enterprise Manager certificate:

getopt 1.1.6

Download Size md5 hash
Binary Data getopt-1.1.6.tar.gz 57.54 KB 4eaff9e6d8b2504a2e0d29ff0e9fd956
Last updated: Mon, 11/24/2014 - 14:47

Release notes

Major bug fixes in this version:

  • Properly quote backslashes for tcsh
  • Detect ambiguous long options properly (thanks to Klaus Wulff <dinw.klswlff@dfgh.net>)

Other changes:

  • Create test harness and tests
  • Sync with util-linux (git 20141120)): translations, manual page and code

Gettext: extracting translations

Symptoms

You have prepared your sources for translation with gettext. You actually have translations available, but those files contain too many translations (for example, for a larger project). Alternatively, you want to see if those files may contain translations you can use. You need to get only relevant translations extracted1.

Pages

Subscribe to Recently created


by Dr. Radut