Opera quick proxy toggle button

If you use Opera and need to easily and quickly toggle on or off your proxy setting, much like Firefox's QuickProxy add-on, you may try this. Point your browser to this URL:


Then accept the installation and drag the button where you want. Clicking on it will toggle the proxy on and off and a long-click will bring you to the proxy configuration menu.


Liferay cannot access login page

If you tinker with Liferay's page permissions, you may accidentally edit those associated with the "Welcome" page, effectively preventing ANYONE from ever logging in again.

To regain access you may try this (replace VERSION with your own):
  • stop Liferay (stop Tomcat), on Linux you need to run: /liferay/apache-tomcat-VERSION/bin/shutdown.sh - you may need to be a superuser to do this. On Windows it's the same path but you should use shutdown.bat instead
  • edit the portal-ext.properties file. You can find it under /liferay/apache-tomcat-VERSION/webapps/ROOT/WEB-INF/classes - and add this line:

NOTE: With this, you are enabling the auto-login feature by ANY means on the portal, so remember to remove that line after you've successfully restored your situation.
  • restart Liferay. It's the same as stopping but you should use startup instead of shutdown
  • open any browser and point to:

Replacing LIFERAY_IP with your portal's IP (could be localhost), LIFERAY_PORT with your portal's port (could be 8080), ADMIN_USERNAME with the portal's admin username (could be test@liferay.com or simply test) and ADMIN_PASSWORD with the portal's admin password (could be test). EG:


NOTE: You may input ANY user/password there, not necessarily the admin's ones, but that user must have the ability to edit the "Welcome" page's permissions, else he'll now be able to login albeit without the means to solve the issue.


MySQL database import and export

Here's a run-down of some useful command line commands to manage the import/export operations of your MySQL database using mysqldump and mysql.

Note that the export operations will lock the database down, preventing any non-read operations to be executed on it along with slowing it down significantly.


[MySQL] Access denied for user ''@localhost

I had a MySQL database on CentOS 5 with user root and no password. I still don't know why, but he no longer had ALL rights on ANY schema, effectively rendering him powerless; plus after logging in:

mysql -h localhost -u root;

a simple

SELECT current_user()

would show '@localhost' and

show databases;

would show only show the information_schema and test schema.

There was no way I could get back my rights, even starting mysql with the --skip-grant-tables option held no positive results and the FAQ on MySQL's site did not cover my case. I kept getting the error: ERROR 1044 (42000): Access denied for user ''@'localhost' to database XXX

Additionally I could not select any database:

use XYZ;

Since I was told I did not have the rights on it. I couldn't even set or change the password neither from shell with:

mysqladmin -u root password 'NEW_PASSWORD'

to set or

mysqladmin -u root -p'OLD_PASSWORD' password 'NEW_PASSWORD'

to change, nor from the mysql prompt:

mysql -u root -p mysql


UPDATE user SET password=PASSWORD('NEW_PASSWORD') where User='root';


Oracle create database link and error ORA-12514

Creating a database link in Oracle is pretty straightforward and both the official documentation and Toad's Knowledge Xpert well detail the steps.

What might happen afterwards however, is that you successfully test your DB link with a client like Toad or SQLPlus, but get the ORA-12514 "TNS: listener does not currently know of service" error when using it from other clients.
This lengthy post goes well deep into how to troubleshoot errors like it, but the most basic thing you should always check first is "Are my TNSNAMES.ORA files correctly configured on both the local and remote DB?"

You may find that the reason why the client you tested the DB link with worked but the link does not work from another source instead, is that your client uses its own copy of the TNSNAMES file while the one read by your DB server is not correctly updated.