How to Search a MySQL Database

With web-based control panels and web software like phpMyAdmin, you have numerous options available for searching a MySQL Database. If the need should ever arise where those tools are not available, however, it is a good idea to know how to search a database from the command line.
To search MySQL from the command line, you need to log in to MySQL and perform a query.
Login as root:
mysql -u root -p
You should get a prompt like “mysql>”
To do a basic search, use the SELECT command. For example, to search for all records with the title of “Sales” that also have the number “44″, enter:
mysql> SELECT * FROM [table name] WHERE title = "Sales" AND number = '44';
You can perform similar queries on any tables in your database. For a more in-depth guide to queries, consult the MySQL documentation.
Photo Source: Wikimedia Commons
Tag: command line, database, mysql, query, search, select, table
Google Boosts Its Servers with Caffeine

Although I am sure plenty of Google employees dope up on gallons of coffee per day, this is not about that kind of caffeine. Google announced on their blog that they are changing the way their servers index sites. As with anything related to Google searching, this is particularly relevant to webmasters who want their websites in the top of Google search results.
Without delving too deeply into the new technology, it is sufficient to note that Google’s indexing just got faster…a lot faster. They are currently refreshing their indexes 50 percent faster than their previous search index technology. The new tech is called Caffeine, and it has a more organic approach to indexing. While the old technology re-indexed the entire web in layers, Caffeine will index small portions more frequently.
I put the new system to the test, just to see how fast it actually was. Yesterday, I posted a new blog entry on one of my other sites. By the time I had saved it and headed over to Google, the new pages were already indexed. When you get things right on your website, this will be a good thing. When you get things wrong, be mindful that Google may index and even cache that page within minutes. Overall, however, it is a good thing, and website owners trying to get information out fast will appreciate it.
Tag: caffeine, google, index, search, web, webmasters, website
How to Display Files Modified Today
There are many ways to search Linux files and directories using grep, find, or locate. All of them find files that match certain search parameters, usually words or characters. On a Linux server, you can also find any files that were modified within the current day. This is useful for finding security exploits and generally tracking website usage.
Using the find command, you can look for all files modified in a specific directory within the current day. To do so, enter the following string:
find -maxdepth 1 -type f -mtime -1
The output will look something like this:
./syslog
./lastlog
./user.log
./auth.log
./daemon.log
./mail.info
./syslog.1
To find only the directories created on the current day, simply change the “f” to a “d”:
find -maxdepth 1 -type d -mtime -1
Using this information can help you track down possible problems. Certain files like ones listed above are supposed to be modified daily, but if you find files that should not be modified, that can be a clue to help you fix whatever ails your server.
Image Source: Wikimedia Commons
Tag: directories, files, find, linux, locate, search, server
Finding Linux files with "locate"

There are a few of ways to find files on a Linux server, but most of them involve actually searching through each file in the filesystem until the correct one is located. This can be time consuming and taxing on the server’s CPU load, especially if you have a lot of files.
Linux has two commands that make searching a little easier: locate and slocate. Unlike other find utilities, locate searches through a database that contains information about the filesystem, bringing up the search results almost instantaneously. The command to update the database is called “updatedb”, and many Linux distributions have the command run via cron every day.
The alternative version of locate, called slocate, is a security-enhanced version that only allows the user to find files he or she has the permission to access. While locate is a great tool for finding things on a server, it does have its issues. For one, you will only find files that were added or changed prior to the last updatedb execution. Furthermore, the very process of updating the database can be taxing on the server, even if it is only once a day. For the right situations, however, locate is a very useful Linux tool.
Photo Source: Flickr
Tag: command, cpu, database, filesystem, linux, locate, search, server, slocate
Whois searching from the Linux command line

There are many web-based Whois search tools and even some desktop ones available for free use, but with the “whois” command on your Linux server, you can use it to perform more complex tasks and even automate the process. For example, you can type:
whois internetblog.org.uk
It will return the registrar, registration status, the date it was registered, renewal date, name servers, address of the registrant, and other important information. Now, if you wanted to automatically send that information to a file, enter:
whois internetblog.org.uk > whois-list
Now, you can continue adding to that list:
whois anydomain.tld >> whois-list
This will append the whois information from the second domain under the information from the first. You can use any Linux/Unix command that can be used to manipulate output to customize the results of your Whois search. For more information about “whois”, type: “man whois” from the command line.
Photo by http://www.anna-OM-line.com
Tag: command, domain, linux, name servers, search, whois
Court rejects suit on Google search results
A British court has rejected a website owner’s complaint against Google for defamatory words in its search results. The problem started with the search results of a website owned by Designtechnica Corp., which apparently displayed offensive words regarding Metropolitan International Schools Limited (MIS), based in the UK.. The website hosts forums that had some derogatory complaints, and MIS wanted Google to remove those words from the search results. They sued both Google and Designtechnica.
The court ruled that Google is not a publisher and is not responsible for the results of searches based on content on websites. Website owners themselves are responsible for their content. If it exists somewhere on their website, there is a chance that it will end up in Google search results. As a result, the judge threw out the case.
Google has come under fire from other website owners in the past in France, the Netherlands, and Spain, all with similar claims that the search engine company should not allow certain words or phrases to appear in the website description area.
“When a snippet is thrown up on the user’s screen in response to his search, it points him in the direction of an entry somewhere on the Web that corresponds, to a greater or lesser extent, to the search terms he has typed in,” [Judge] Eady said. “It is for him to access or not, as he chooses.”
Source: MSNBC