Posts

Showing posts from March, 2018

User login and registration using nodejs and mysql with example:

In this tutorial, I am going to create simple email and password login authentication and register a user using nodejs and mysql. I will save simple password in mysql database but this is not good practice for security reason so in next tutorial, you will know the use of BCrypt module of Node.js to encrypt passwords. This tutorial will explain only how to save a record in mysql table and how to check email exist or not in the table with given password. To handle post parameters of Http request in Node.js, we use Body-Parser module. Step1: Table and directory structure: In first step, create a "users" table in the database by running following command in phpmyadmin or in mysql shell : CREATE TABLE `users` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `name` varchar(255) NOT NULL,   `email` varchar(255) NOT NULL,   `password` varchar(255) NOT NULL,   `created_at` datetime NOT NULL,   `updated_at` datetime NOT NULL,   PRIMARY KEY (`id`) ) E

PHPMyBackup - A PHP MySQL differential backup script

A PHP MySQL differential backup script PHPMyBackup is a PHP script designed for backing up an entire MySQL server on the command line. What makes it unique is it only uses use  differential  methods to dump only the changes as it keeps a local copy of all the synced databases & tables. Software features Only download changed/altered tables (checksum) Allows specifying subset of databases for backups (supports wildcard) Allows skipping of specified databases from backups (supports wildcard) Allows skipping of specified tables or table-data (supports wildcard) Integrates with  mysqldump  client for individual sql dumps Backup rotation Limitations No database locking during backup. because a separate `mysqldump` is called for every table download, only table locking is used. This has been tested in several environments, but your own full testing is always advised! Requirements A MySQL user on the server with ‘SELECT’ & ‘LOCK TABLES’ permissions tar  with