HostOnNet Blog

Category Archives: Database

How to create MYSQL database using PhpMyAdmin in localhost

I was planning to develop a tourism website on WordPress. As a first step, I installed LAMP on my PC in which I am using Ubuntu 16.04. Then I installed PhpMyAdmin on my computer by following this tutorial. Then started


Working with PostgreSQL psql

psql command is used to connect to PostgreSQL database. To login to PostgreSQL database, run You will be asked to enter password. List all databases To list all databases use command \list or \l Connect to a database Before you


Create User and Database in PostgreSQL

PostgreSQL default user name is postgres. This is a system user, so to login, first change to this user with command Now you can connect to PostgreSQL by simply running psql Now you have full rights to PostgreSQL installation. Create


PostgreSQL DESCRIBE TABLE

DESCRIBE TABLE is a command used in Oracle database to show structure of a table in database. The PostgreSQL equivalent is \d+ TABLE_NAME You will need to see database structure to work with databases. Example


Restore PostgreSQL Database

To restore Database in PostgreSQL, run pg_restore -h POSTGRESQL_SERVER_IP -p 5432 -U POSTGRESQL_USERNAME -d POSTGRESQL_DB_NAME -v backup.dump -p = specify port used by PostgreSQL server. -d = Connect to database and restore directly into the database. -v = Specifies verbose


How to deactivate WordPress Plugins using PHPMyAdmin

We can deactivate a plugin through WP Admin Dashboard. What we can do if we can’t accessing the admin area ? Yes, The following situations may block you out from accessing the dashboard 1). Will show a blank page after


PostgreSQL – Quick Start Guide

After you install PostgreSQL on Ubuntu/Debian, it will create a user “postgres”, it have full privileges. It is like “root” user in MySQL. Connect to PostgreSQL To connect to PostgreSQL, run following command. This will change current user to linux


How to Check PostgreSQL is installed or not on Linux

PostgreSQL is a popular database management system that is used to handle the data of many websites and applications. If you were to run which psql and Postgres is not installed there appears to be no output. You just get


MySQL access from command line on Ubuntu

First connect to your Ubuntu server using ssh and run below command It will give you a password prompt as follow: Enter root password there and press enter key, then it will be connected successfully. It will show below output: To


Securing MySQL database on Cpanel Servers

After you setup Cpanel, you have to do few things to secure MySQL on Cpanel server. 1. Delete the test database This can be done with command mysqladmin drop test 2. Change MySQL root Password This can be done through