From the category archives:

Database

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…)

{ 0 comments }

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…)

{ 1 comment }

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…)

{ 5 comments }

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…)

{ 1 comment }

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…)

{ 9 comments }

How To Change MySQL Root Password

by Ramesh Natarajan on July 17, 2009

Question: How do I change MySQL root Password?

Answer: You can change MySQL root password using one of the following 3 methods.
(more…)

{ 4 comments }

15 Advanced PostgreSQL Commands with Examples

by SathiyaMoorthy on May 21, 2009

postgreSQL DB
Some of the open source application comes with postgreSQL database. To maintain those application, companies may not hire a fulltime postgreSQL DBA. Instead they may request the existing Oracle DBA, or Linux system administrator, or programmers to maintain the potgreSQL. In this article let discuss about the 15 practical postgresql database commands which will be useful to both DBA and expert psql users.

Also, refer to our previous article about 15 Practical PostgreSQL DBA Commands.
(more…)

{ 9 comments }

Oracle 11g lsnrctl CommandStarting up and shutting down the oracle listener is a routine task for a database administrator. However a Linux system administrator or programmer may end-up doing some basic DBA operations on development database. It is critical for non-DBAs to understand the basic database admin activities.

In this article, let us review how to start, stop, check status of an oracle listener using Oracle listener control utility LSNRCTL.
(more…)

{ 0 comments }