Search This Blog

Thursday, March 24, 2011

[Mysql] ERROR 1045 (28000): Access denied for user

If you get following error while executing a OUTFILE query

mysql> select field1,count(*) into outfile '/tmp/temp.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from table group by field1;
ERROR 1045 (28000): Access denied for user 'test'@'10.0.3.%' (using password: YES)

then the most probable cause reason is that the entry for the username used by you does not have the FILE privilege enabled in the user table.

Read Full Details @

[Mysql] SELECT ... INTO OUTFILE

The SELECT ... INTO OUTFILE statement is intended primarily to let you very quickly dump a table to a text file on the server machine. If you want to create the resulting file on some other host than the server host, you normally cannot use SELECT ... INTO OUTFILE since there is no way to write a path to the file relative to the server host's file system.

example:

SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  FROM test_table;
Read Full Details @

Monday, March 21, 2011

Job switching: What you need to do before you take the plunge

"The people who get on in this world are the people who get up and look for the circumstances they want, and, if they can't find them, make them." - George Bernard Shaw

Switching careers is no doubt challenging. Throwing away all that you have worked for, to pursue hitherto unknown territory is no mean task. It takes a great deal of hard work, determination and perseverance along with a well thought out game plan to get what you want.

However, you must know exactly what you want and to what length you will go for it. Firstly, distinguish between a job change and a career change.



Being unhappy with your current job because of your equation with your boss or peers or a measly salary does not call for a career change. The solution may lie in a job change.

Switching a career refers to a shift in job profile. It can mean switching sectors based on the same skills or it can mean a completely different profession.

An example of the former is a public relations professional switching to copyediting books (the basic qualifications and skills required are similar) while the latter will be like a banker becoming a chef. Either way you have to think really hard, invest time and energy before taking the plunge. Never be impulsive. Consider the following before switching:

Skills and interest
Prioritise
Groundwork required
Training
Flexibility
Way ahead!

Read Full Article @

Spring WS 2.0: New Integration Test Support


Spring WS 2.0 introduced a new integration testing module, spring-ws-test, which provides a fluent API for testing both the client- and server-side of Web service. In my previous article on Spring WS 2.0 and SOAP-based Web services , I explored some of the new features introduced in the 2.0 release. In this installment, I'll dive into spring-ws-test. In the previous article, we exposed a SOAP Web service endpoint (using @Endpoint annotation) on the server, but we did not write the client side. The client side can be written using Spring WS, but it is not mandatory as you can generate client-side code from WSDL using any other framework such as Axis. The advantages of using Spring WS to write client code are:
  1. Spring WS provides a lightweight alternative that does not need a WSDL contract to work. This means that you are free from any code generation (i.e. generating client code from WSDL).
  2. Spring WS requires no dependency on any other Web service framework.

FFmpeg Developers Forked As Libav

Following a number of internal disputes among FFmpeg developers in recent weeks, a group of these developers have stepped away from the project and have forked off of the FFmpeg code-base to create a new project called the "libav" project.

This fork was launched over the weekend and was already brought up in our forums. Though as this change has just been announced hours ago, it's not yet clear which developers are behind this change and the other details involved.

All of the FFmpeg assets are being transferred to libav.org. As some readers have already expressed, the new libav name is also arguably confusing with there already being the libva project (VA-API lirary), libavcodec (the A/V codec library as part of FFmpeg), etc.

More details as they emerge.



Read Full Article @

Start drooling, slowpokes: Internet2 ramps up to 8.8Tbps


Great gobs of gigabits! The Internet2 research and education group says it is upgrading its national backbone network with help from broadband stimulus funding, and the end result will be a structure delivering 8.8 terabits per second bandwith.
This super-fast system will connect the US Unified Community Anchor Network (US UCAN), around 200,000 community "anchor institutions"—K-12 schools, libraries, clinics, hospitals, community colleges, and such. In the winter of 2010, the project received a $62 million broadband stimulus grant from the government to get this project underway.
The plan is to roll out a series of advanced telemedicine and distance learning programs across the country "that are not currently possible with consumer-grade Internet service." Internet2 is a non-profit representing about 200 universities working with various corporations.
"Commercial networks are far too congested to support, and are not optimized for, advanced broadband applications for community anchors like telepresence and telemedicine," the project's stimulus grantapplication noted. They also "do not provide the necessary transparency required to immediately trouble-shoot application-crippling problems across networks. They also do not generally offer next generation Internet technologies like IPv6 and IP multicast, which are critical to certain applications."
Internet2 is deploying this with the assistance of the Ciena networking company. The project will deploy Ciena's ActivFlex 6500 Packet-Optical Platform for the network, which is also used in Vietnam, where the number of Internet users has more than doubled since 2005.
Ciena just concluded a 100G backbone trial with Vietnam Telecoms National that spanned 500 kilometers, connecting the cities of Vinh and Danang.

Wednesday, March 16, 2011

Tuesday, March 15, 2011

Are you doing a good job?


One way to approach your work: "I come in on time, even a little early. I do what the boss asks, a bit faster than she expects. I stay on time and on budget, and I'm hardworking and loyal."

The other way: "What aren't they asking me to do that I can do, learn from, make an impact, and possibly fail (yet survive)? What's not on my agenda that I can fight to put there? Who can I frighten, what can I learn, how can I go faster, what sort of legacy am I creating?"

You might very well be doing a good job. But that doesn't mean you're a linchpin, the one we'll miss. For that, you have to stop thinking about the job and start thinking about your platform, your point of view and your mission.

It's entirely possible you work somewhere that gives you no option but to merely do a job. If that's actually true, I wonder why someone with your potential would stay...

In the post-industrial revolution, the very nature of a job is outmoded. Doing a good job is no guarantee of security, advancement or delight.

Read Full Article @

The message is clear-cut: upgrade or perish

Employees at outsourcing firms may have another reason to stop focusing on honing their accents: there are others who can take care of that, what with workforces becoming global. Industry body Nasscom reckons that by 2020, 8-10 per cent of the workforce could be non-Indian. Five years back Infosys had less than 2% non-Indians on its rolls; today that figure is 6.1%. The upshot: how you sound when you speak matters less than before.

WNS' Swaminathan compares employees to versions of software. ``Earlier versions had a longer shelf life. Now technology dies faster. "So IT-BPO workers need to refresh faster, even as new workers coming with specialist skills will be in demand,'' he says. The message is clear-cut: upgrade or perish. 



Read Full Details @

Monday, March 14, 2011

[Mysql] A common mistake when using CURDATE

An example of one of most common mistake while using CURDATE is

select DATE(creationdate) from tablename where DATE(creationdate)=CURDATE()-1 limit 3;

output of CURDATE()-1 is as follows


mysql> select CURDATE()-1;
+-------------+
| CURDATE()-1 |
+-------------+
|    20110313 |
+-------------+
1 row in set (0.00 sec)

but it should be something like this

mysql> select CURDATE();
+------------+
| CURDATE()  |
+------------+
| 2011-03-14 |
+------------+
1 row in set (0.00 sec)

basically, in the format YYYY-MM-DD

and hence the correct way of using CURDATE is as follows



mysql> select DATE_SUB(CURDATE(),INTERVAL 1 DAY);
+------------------------------------+
| DATE_SUB(CURDATE(),INTERVAL 1 DAY) |
+------------------------------------+
| 2011-03-13                         |
+------------------------------------+
1 row in set (0.00 sec)

Friday, March 4, 2011

[mysql] Incorrect key file for table


Problem
Mysql query results in this error every time:
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql518e_1_2.MYI'; try to repair
it
Cause
Free space is not sufficient in /tmp partition
Resolution
Increase allocation to /tmp
OR
Review the query
OR
Change tmp path in mysql
Read Details of this bug @

[mysql] SHOW TABLE STATUS Syntax

SHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of information about each non-TEMPORARY table. You can also get this list using the mysqlshow --status db_name command. The LIKE clause, if present, indicates which table names to match. The WHERE clause can be given to select rows using more general conditions, as discussed in Section 20.28, “Extensions to SHOW Statements”.


Read Full Details @

Wednesday, March 2, 2011

Mysql - Got error 127 when reading table

If you encounter the following problem for any table

110302 16:18:22 [ERROR] Got error 127 when reading table './db/table'

then you should execute the following basic commands before trying to debug further

flush tables;
flush hosts;

FastWurfl - A Faster Wurfl


welcome

Welcome to the FastWurfl open source project. The project provides an interface to WURFL XML files and is written in Java.

overview

The most important features of this project are
  • * Lightweight - no 3rd party parser required
  • * Easy to use - few and simple interfaces
  • * Efficient - fast setup and usage
FastWurfl is suitable for CPU- and memory-constrained environments which need access to the WURFL capabilities.
The library comes in two flavors: standard based on StAX and realtime based on Javolution.