Create a copy of MySQL Database using phpMyAdmin

Sometimes it requires to quickly create a clone of the MySQL database while working on the project either for the backup purpose, using it on a copy of the project, or moving the project.

With phpMyAdmin, this process is easier.

In this tutorial, I am assuming that you already have a cPanel enabled web hosting server.

Create a copy of MySQL Database using phpMyAdmin

Read more

How to install Elasticsearch on Windows System

Elasticsearch is open-source and NoSQL based distributed search engine which is written in JAVA.

It is designed for high-performance searches on large data.

For data storing it uses indexes which is the collection of different types of document and properties.

Compares to the relational database is very fast.

  • A relational database consists of –
    Databases -> Tables -> Row/Columns
  • But the Elasticsearch consists of –
    Indices -> Types -> Documents with properties

To communicate with it requires REST APIs.

It is supported by various languages – JAVA, PHP, Python, JavaScript, Node.js and many others.

In this tutorial, I am using XAMPP for its installation.

How to install Elasticsearch on Windows System

Read more

Prevent multiple login of same account with PHP

Sometimes required to restrict the user to only log in on a single system or a browser at a time.

To prevent the user from login on multiple systems or web browsers you need to generate a token on each successful login attempt.

Need to check the token on each page. If the token does not match then destroy the SESSION and log out the user.

In this tutorial, I show how you can prevent multiple logins of the same user with PHP.

Prevent multiple login of same account with PHP

Read more

Connect to multiple MySQL databases with PHP

Within the project sometimes requires using multiple MySQL databases. It may be the existing database from another project or the new one.

To handle this with PHP requires to create separate connections for each database and use the connection accordingly while manipulating data in MySQL database.

Connect to multiple MySQL databases with PHP

Read more