Unable to locate an oracle.mk or other suitable *.mk (DBD::Oracle Perl module compilation failed)

To install a working Perl environment to manage remote Oracle databases, you need to install the Oracle Instant Client

To install the Oracle Instant Client version 64 bits, download the rpm files as shown below :

root@localhost:~# rpm -i oracle-instantclient11.2-basic-
root@localhost:~#rpm -i oracle-instantclient11.2-odbc-
root@localhost:~#rpm -i oracle-instantclient11.2-sqlplus-
root@localhost:~#rpm -i oracle-instantclient11.2-devel-

The installation works fine.

To install DBD::Oracle perl module, use CPAN if it is not available from RHEL yum repositories.


cpan[1]> install DBD::Oracle

This command will install the module and the missing dependencies. if the development files of the Oracle Instant Client are not installed (oracle-instantclient11.2-devel- not installed), you will have the following error during DBD::Oracle perl compilation :

Unable to locate an oracle.mk or other suitable *.mk
file in your Oracle installation.  (I looked in
/usr/lib/oracle/11.2/client64/rdbms/demo/demo_xe.mk /usr/lib/oracle/11.2/client64/rdbms/lib/oracle.mk /usr/lib/oracle/11.2/client64/rdbms/demo/oracle.mk /usr/lib/oracle/11.2/client64/rdbms/demo/demo_rdbms.mk /usr/lib/oracle/11.2/client64/rdbms/demo/demo_rdbms64.mk /usr/lib/oracle/11.2/client64/rdbms/lib/ins_rdbms.mk /usr/share/oracle/11.2/client64/demo.mk under /usr/lib/oracle/11.2/client64)

The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
RDBMS product.  You need to build DBD::Oracle on a
system which has one of these Oracle components installed.
(Other *.mk files such as the env_*.mk files will not work.)
Alternatively you can use Oracle Instant Client.

In the unlikely event that a suitable *.mk file is installed
somewhere non-standard you can specify where it is using the -m option:
perl Makefile.PL -m /path/to/your.mk

See the appropriate README file for your OS for more information and some alternatives.

at Makefile.PL line 1187.

/usr/bin/mysql: Unknown OS character set ‘ISO-8859-15’. /usr/bin/mysql: Switching to the default character set ‘latin1’.

While restarting mysql on Debian Wheezy, I have this serie of error messages continuously on the standard error output :

/usr/bin/mysql: Unknown OS character set ‘ISO-8859-15’.
/usr/bin/mysql: Switching to the default character set ‘latin1’.

As explained here and there , mysql is unable to understand this particular locale. For instance, es_ES@euro is just an alias of es_ES@ISO-8859-15. Any @euro based character set can not be interpreted directly by MySQL. The @euro part needs to be replaced with ISO-8859-15. To prevent new error messages after restarting the mysql service, the LANG variable must be set with the value es_ES.ISO-8859-15  in the mysql init script.

At the beginning of this script, add this line :

export LANG=es_ES.ISO-8859-15

And restart the mysql service :

root@localhost:~#service mysql restart

Database designing with free/open source softwares

Some free / open source softwares are available on the web for database design/administration. There are two of them which are available as free download : MySQL Workbench and Open ModelSphere.

They can be installed on Windows or Linux platforms. MySQL Workbench was formely known as DB Designer. With the latest release of MySQL Workbench (ex-DB Designer 4), only the oldest versions of DB Designer are available on download.

For more information :

MySQL Workbench
Open ModelSphere
DB Designer

MySQL : Listing the system and object privileges for a given user

If your are connected as root on your MySQL database, you can list all the system and object privileges for a given user :

mysql> show grants for user ‘fool’@’localhost’;

or if you are connected as the user fool :

mysql> show grants;

mysql> show grants for current_user;

mysql> show grants for current_user();

current_user function is available if your MySQL version is equal or higher that 5.0