How to: change WordPress user password with MySQL

Did ever happened to you that you are unable to login in a wordpress blog because you have not access to the email account?

There’s a way to recover your account without knowing the last password. The only thing you need is access to PhpMyAdmin and five minutes.

First step: access to PhpMyAdmin and go to the users table.

Second step: locate the row which needs the change, click the ‘Edit’ link.

Third step: The link will lead you to a form, locate in the form the value for the column ‘user_pass’. After that, you need to fill in the input your new password enconded in md5. Finally don’t forget to press the update button to save the row changes.
2016-07-23 15_20_39-Settings

Tip: You can use services like md5.cz to encode a string to md5.
Shortcut: On second step, intead of use the ‘Edit’ link you can execute de following query:

UPDATE `wp_users` 
SET `user_pass`= MD5('yourpassword') 
WHERE `user_login`='yourusername';

Heat map: Ashley Madison’s users distribution

Hello everyone!

Did you remember the Ash Madison leak, last week? Users around the world are seeking for information that should be confidential after a group of hackers decided to publish the database from the site. Of course, and due to the sensible nature of the data, there’s a lot of people looking for people they know -or at least their emails and other data- in this massive leak.

As there’s people taking this unfortunate events as an opportunity to find and embarrass their friends, work colleagues, bosses and ever their spouses, there’s other group of people looking for do ‘the good’ with this situation and teach us that the protection of our privacy should be a fundamental part of our Internet behavior, once and for all.

So, I’ve found this graphic that shows the detail of the site’s users distribution. As we can see in the graphic by city, most of the users by city were, at least, composed by an 85% of men. What a surprise.

SCJP preparation execises #001

Given the following code:

public class Foo {
    static void method(int...x) {
         // insert code here
    }
}

Which code fragment, inserted independently at line 12, will allow the class to compile?
1. for each(x) System.out.println(x);
2. for(int z : x) System.out.println(z);
3. while( x.hasNext()) System.out.println( x.next());
4. None of the above

Answer

Option 2 is correct

[collapse]

Simple DB maintenance for your wordpress blog without any plug-in

Hello everyone!

Sure it happened you more than once. Your lightweight wordpress blog database has turned with some time and a lot of articles in a heavy, big and unoptimized information core for your site.
But what happened? Could this get reversed? Fortunately yes. Your wordpress site can run smooth again.

If you are not up to install some plugins in order to get the optimizations that you need for a faster blog then you can run the following queries.

Please, before do anything else, backup your database.

The following query get rid off all the revision posts:

DELETE FROM `wp_posts` WHERE post_type = 'revision';

This one deletes the autodraft posts:

DELETE FROM `wp_posts` WHERE post_status = 'auto-draft';

And this sends them to the place to its only place to be:

DELETE FROM `wp_comments` WHERE comment_approved = 'spam';

Finally, this one deletes the unapproved comments:

DELETE FROM `wp_comments` WHERE comment_approved = '0';

Just to finish, comes this bonus that will delete some data from the wp_options table.

DELETE FROM `wp_options` WHERE `option_name` LIKE ('_transient_%');

If you do this optimizations with a regular basis, you’ll get an efficient wordpress site.

How to point to your test server if you don’t have a static ip – tutorial

Hello world!

Due to a recent friend request, I share you how to make some test in a test server without need to worry about the change on the IP address.

We have to recognize it, it’s pretty hard to remember an IP, specially if this is changing continously. To accomplish that, we can count with very interesting services, one of them is No-IP, which is very useful on this situations. The company provides a service of host/redirect, when this feature is used with a software client, it allows to the users to access the personalized subdomains created by them in the domains offered by No-IP.

To make use of this services is completely necessary to count with a No-IP account. Create one is a process that won’t last more than five minutes. Once when we finished up the sign up process we’ll download the client named “DUC”. This software, created by No-IP is available for Windows, Mac and even Linux (Ubuntu, at least). It can be downloaded at http://www.noip.com/download. The installation is fast, the software very light-weight and only require us to give the No-IP’s service user and password.

Getting back to the creation of the personalized host it is necessary to follow the next steps:

In the aside menu, we click on the link “Add host” in the “Host/Redirects” subsection.

After that, we’ll see a page to add a new host. Here we type a hostname, and we’ll also select one of the free domains from list. To finish, we’ll click on the “Add host” option.

At the end, we’ll be in front of list of all the available host (which we created). Of course, the one recently created will be included.

At this point, the configuration part will be done. Now, we’ll work directly in the No-IP’s DUC.
In the screenshot below we’ll see the main program screen, we have pressed the “Edit Hosts” button.
In this option we select the host which we plan to use on the local server.

We are all done! No-IP will handle the rest: Once we visit our free host No-IP will use their technology to keep updated in the No-IP DNS’s our IP address, hence, when we visit the domain we’ll see that is perfectly working.

Voilá! Now we can point to our test server if we don’t have an static ip. Piece of cake, don’t you think?

Cisco warns about mail scam on windows 10 update

The company specialized on security released information about a new mail scam which is taking advantage with the Windows new Operative System upgrade.

According to the information, users have received emails informing about the “upgrade” from the email upgrade@microsoft.com with really doubtful links on it. The security firm says that the email is sent from a server located on Thailand.

For further information, please read the full article on USA Today: Beware scam Windows 10 download emails

Some SCJP exercices soon

Hello world! This message is my reappearance on the blog. Due to some work and laziness I’ve been out of the project to share some of my experiences with all of you (knowlegde sharing is the beginning of something). You can’t go through life just learning, you have to teach, even if it’s just a little of what you know.

This is a very brief message just to try to give some advise to any developer who’s reading this to encourage you to get a certification. All of you know that in technology much of the workers are people who demonstrate their work in a practical approach more than in a resume or a degree. And that is good because the one who want does much more than the one who can. That fact, in general, talks us about the competitive that tech sector has. But we also know that sometimes we need a good backup and that is what the certification is about.

In the next few days I’m going to share with you some demo questions for the Oracle Certification Java Programmer or OCJP (in ancient times known as Sun Certification Java Programmer, SCJP) which these days is my hot topic. That being said it’s time to say good bye!
CLEAR YOUR MIND, BUT KEEP CODE ON!

Why MySQL data source is not appearing on Visual Studio 2010?

Hello everyone!

Today I’ll show you how to make work the MySQL data source for MySQL in Visual Studio. The thing is that the MySQL ADO connector is linked in some kind of way with the Visual Studio version. This is some kind of obvious but you do not expect this from big community such a MySQL (and Oracle).

Let’s start with the info! A moment ago when I opened my Visual Studio 2010 and tried to begin a configuration to connect MySQL I noted that the connector suddenly dissapeared.

2015-03-09 11_01_42-choose_datasource

Why did my connector dissapear? The answer is very simple: I’ve updated it. So don’t do that if you want to keep it. I installed the 6.9.6 ADO .NET connector. If you did that too I have some news you gotta to…

2015-03-09 11_08_23-uninstall

After that just install the old (outdated but still functional) MySQL ADO .NET connector and you ready to go!
The version 6.6.7 is the last that seems to work with the Visual Studio 2010 but If you have news from any newer please let me know to update this post.

2015-03-09 11_16_46-MySQL_download

When you open again your Visual Studio 2010 and try to make a MySQL connection via data source the world will be spinning again.

2015-03-09 11_23_07-peaceOfMind

Hope this article solves your problem. Happy coding!