Database

Most of you are already familiar with SQL database, and have a good knowledge on either MySQL, Oracle, or other SQL databases. In the last several years, NoSQL database is getting widely adopted to solve various business problems.

It is helpful to understand the difference between SQL and NoSQL database, and some of available NoSQL database that you can play around with.
(more…)

15 SQLite3 SQL Commands Explained with Examples

by Ramesh Natarajan on September 20, 2012

SQLite3 is very lightweight SQL database which focuses on simplicity more than anything else. This is a self-contained serverless database engine, which is very simple to install and use.

While most of the commands in the SQLite are similar to SQL commands of other datbases like MySQL and ORACLE, there are some SQLite SQL commands that are different.

This article explains all the basic SQL commands that you need to know to use the SQLite database effectively.
(more…)

SQLite3 is an extremely lightweight SQL database engine that is self-contained and serverless.

There is absolutely no configuration that you need to do to get it working. All you need to do is–install it, and start using it.

Since this is serverless, it is used in lot of the famous software that you are using, and you probably didn’t even know those software were using it. View this list to see all the big name companies who are using SQLite. PHP programming language has SQLite database built in.

If you’ve never used SQLite, follow the steps mentioned in this article to install it on Linux, and create a sample database.
(more…)

How to Allow MySQL Client to Connect to Remote MySQL server

by Ramesh Natarajan on August 12, 2010

By default, MySQL does not allow remote clients to connect to the MySQL database.

If you try to connect to a remote MySQL database from your client system, you will get “ERROR 1130: Host is not allowed to connect to this MySQL server” message as shown below.
(more…)

8 PostgreSQL Date and Time Function Examples

by Balakrishnan Mariyappan on July 8, 2010

In this article, let us review following PostgreSQL date and time functions with practical examples.

  • now()
  • now()::date
  • now()::time
  • date_part()
  • age()
  • extract()
  • date_trunc()
  • to_char()
  • to_timestamp()

(more…)

Photo courtesey: Jessica Finson

Photo courtesy: Jessica Finson

A while back we tried to customize unix prompt to look like Angelina Jolie.

Oh boy, didn’t I fail miserably in that attempt? Well, that didn’t stop me from trying an extreme makeover for mysql> prompt.

Let us face it. The following mysql> prompt is boring. Nobody wants to see it. Let us change the default mysql> prompt to something functional and useful.
(more…)

Question: How do I disable mysql history? I don’t want mysql to remember the previous commands that I typed from the mysql> prompt. This is important for me, as when I type some sql commands that contains passwords, I see the clear text password stored in the ~/.mysql_history, which I don’t want to happen.

Answer: Bash history feature stores the Unix commands typed in the command line in the ~/.bash_history file. Similar to bash shell, mysql stores the commands typed in the mysql> prompt in the ~/.mysql_history file.

In this article, let us review how to disable mysql history.

(more…)

Forgot MySQL Root Password – How To Reset It?

by Ramesh Natarajan on July 22, 2009

Recover MySQL Root Password on Ubuntu and DebianForgot your MySQL root user password? Don’t worry. We are here for rescue.

When you tried to login to root without entering a password, you may get ‘Access Denied’ message, as MySQL is expecting a password.

This article explains how to recover mysql root password by setting a new MySQL password when you don’t remember your old one.

(more…)