MySQL 8.0 is now fully supported in PHP 7.4
MySQL and PHP is a love story that started long time ago. However the love story with MySQL 8.0 was a bit slower to start… but don’t worry it rules now ! The support of MySQL 8.0’s new default authentication method in PHP took some time and was added in PHP…
Category : Databases 27-10-2020 by Janeth Kent
Optimize MySql On Low Memory Servers
Cloud computing makes it very affordable to get your own private virtual server on the Internet. Digital Ocean offers an entry level droplet for USD$5 per month, and Amazon.com has a micro instance tier on the EC2 platform that is free for the first year. These instances are rather useful…
Category : Databases 25-08-2020 by Luigi Nori
Mysql:Guide To The MySql Query Cache
MySQL “Query Cache” is quite helpful for MySQL Performance optimization tasks but there are number of things you need to know. First let me clarify what MySQL Query Cache is - I’ve seen number of people being confused, thinking MySQL Query Cache is the same as Oracle Query Cache - meaning…
Category : Databases 25-03-2020 by Janeth Kent
How JSON data types work in mysql
First introduced in MySQL 5.7.8, the JSON data type is a specialized binary column type, similar to a blob , but with added machinery to optimize the storage and retrieval of values from a column typed as json . Javascript Object Notation or more commonly known as JSON, is a modern…
Category : Databases 30-09-2019 by
How to import and export a large database using SSH
The following code snippets will allow you to import and export a database Command Line. To get SSH access to your hosts server you will need to contact your web hosting company, our suggestion is that you find a reliable, high-performing, secure hosting company that can help you. In case you are on a…
Category : Databases 25-06-2019 by Janeth Kent
How to Disable Strict SQL Mode in MySQL 5.7 and Ubuntu 16.04
If your app was written for older versions of MySQL and is not compatible with strict SQL mode in MySQL 5.7, you can disable strict SQL mode. For example, apps such as WHMCS 6 and Craft 2 do not support strict SQL mode. If you're using WHMCS 7, see our article…
Category : Databases 18-02-2019 by Janeth Kent
Tips on How to Prevent Data Loss for Your Business
Data is information stored electronically that makes the world go round, and for businesses, in particular, it could include sensitive information about its finances, customers, and employees. The majority of businesses rely on data stored on computers and hard drives, yet this is at risk of being lost due to…
Category : Databases 21-06-2018 by Janeth Kent
MYSQL: How to create a new user and give it full access only to 1 database
To create a new user in MySQL and give it full access only to 1 database, say dbTest, these are the MySQL commands to do that To create the user: CREATE USER 'user'@'hostname'; To give it access to the database dbTest: GRANT ALL PRIVILEGES ON dbTest.* To 'user'@'hostname' IDENTIFIED BY 'password'; If you are running…
Category : Databases 07-02-2018 by Janeth Kent
ArangoDB, install and configure the popular Database in ubuntu 16.04
Introduction to ArangoDb, open source, NoSQL, multi-model database BigData seems to be getting stronger every day and more and more NoSQL databases are coming out to the market, all trying to position themselves in the lead to be the reference. This week I tried ArangoDB! Another NoSQL database? Today I'm going to…
Category : Databases 14-11-2017 by Janeth Kent
Install Memcache in Ubuntu 16.04
Memcache is an in-memory key-value store that is ideal for speeding up infrastructure. Perhaps a slow operation needs access to rarely-changing data, or files are accessed on slow storage systems. By integrating Memcache, the result of slow queries or reads can be keyed to a unique value, and future accesses…
Category : Databases 28-09-2016 by Janeth Kent
MySql: How to build a performant search engine
In content-heavy websites, it becomes increasingly important to provide capable search possibilities to help your users find exactly what they’re looking for. The most obvious solution is searching your MySQL database directly, but implementing a generic MySQL search is not at all trivial. Here’s how to avoid those pitfalls and…
Category : Databases 10-09-2016 by Janeth Kent
PHP: Storing arrays in database
When working with databases, sometimes it is necessary to store an array in a MySQL field. Unfortunately, there is no way to directly pass in an array as a parameter. Storing these data structures is a bit more complex, but by no means hard or impossible. To convert any array (or…
Category : Databases 18-11-2013 by Janeth Kent
Tutorial: Introduction to PHP:PDO
Many PHP programmers learned how to access databases by using either the MySQL or MySQLi extensions. As of PHP 5.1, there’s a better way. PHP Data Objects (PDO) provide methods for prepared statements and working with objects that will make you far more productive! PDO Introduction “PDO – PHP Data Objects…
Category : Databases 15-10-2013 by Janeth Kent
Setup and Manage Mysql/MysqlAdmin root password
Managing mysql main root password is one of the most common questions/problems that new linux users have, and one of the essential tasks. By defaultroot user is MySQL admin account. The Linux / UNIXlogin root account for your operating system and MySQL root aredifferent. They are separate and nothing to…
Category : Databases 18-07-2013 by Janeth Kent
How to Easily Install Hadoop in Ubuntu 12.10
This tutorial covers the installation steps of Apache Hadoop 1.0 and 2.0 in Ubuntu Linux. I will also go through the configuration for running it on pseudo-distributed mode. Pre-Requisites Java 6 or later (Hadoop is written in Java) Linux OS (Windows is supported only in development mode. Other flavors of…
Category : Databases 11-07-2013 by Janeth Kent
Redis: installation and usage on Ubuntu/Debian
About Redis Redis, developed in 2009, is a flexible, open-source, key value data store. Following in the footsteps of other NoSQL databases, such as Cassandra, CouchDB, and MongoDB, Redis allows the user to store vast amounts of data without the limits of a relational database. Additionally, it has also been compared…
Category : Databases 01-07-2013 by Janeth Kent
NoSQL Concept and MongoDB
NoSQL has emerged as a different and alternative approach compared to relational database management systems (RDBMS). Actually, there are fundamental differences between the scalable NoSQL systems and relational database management systems. Relational database management systems are transaction-based and have ACID rules. NoSQL systems do not fully support the ACID rules and there is no…
Category : Databases 28-06-2013 by Janeth Kent
PHP Recursive Backup of MySql Database
This script can be used to make backup of your MySql database, you can use the script in conjunction with cronjobs $user = 'myuser'; $passwd = 'mypass'; $host = 'myhost'; $db = 'mydb'; // Delete the tables if they exists? $drop = true; // Tables that will be created $tables = false; // Compression algorythm that we will use $compression…
Category : Databases 24-06-2013 by Janeth Kent
A List of Best Free SQL Injection Scanners and Tools
We’ve compiled a list of free SQL Injection Scanners we believe will be of a value to both web application developers and professional security auditors. Checking for SQL Injection vulnerabilities involves auditing your web applications and the best way to do it is by using automated SQL Injection Scanners. SQLbftools –…
Category : Databases 03-06-2013 by Janeth Kent
Big Data and Hadoop: an explanation
Our world is a potential treasure trove for data scientists and analysts who can comb through massive amounts of data for new insights, research breakthroughs, undetected fraud or other yet-to-be-discovered purposes. But it also presents a problem for traditional relational databases and analytics tools, which were not built to handle…
Category : Databases 24-05-2013 by Janeth Kent
Memcache: Installation and Usage on Ubuntu 12.10
About Memcache Memcache is a system that works to speed up virtual private servers by caching server information. The program allows you to allocate a specific amount of the server ram toward caching recently queried data for a certain amount of time. Once the data is requested again, memcache speeds up…
Category : Databases 03-05-2013 by Janeth Kent
MySql: Setup Master Slave Replication in Ubuntu
About MySQL replication MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database. This can helpful for many reasons including facilating a backup for the data,a way to analyze it without using…
Category : Databases 02-05-2013 by Janeth Kent
Creating a Notepad app with indexedDB
indexedDB, which is new in HTML5, allows developers to persist data within the web browser. As a result your app runs both online and offline with powerful query facilities. indexedDB is different from traditional relational databases in that it is an objectStore instead of a collection of rows and columns. You just…
Category : Databases 14-04-2013 by Janeth Kent
Genghis - Mongo DB Manager in a single file
For NoSQL fans, MongoDB is definitely the most popular solution with the simplicity and cross-platform support offered. In order to manage MongoDB databases easily, Genghis, a single-file, self-hosted and web-based solution is pretty handy. It can be installed either as a Ruby gem or as a standalone PHP script. Genghis is capable of managing any number of databases…
Category : Databases 11-04-2013 by Janeth Kent
Import data from Mysql to MongoDb with EzSql class
This simple php class to demonstrate how to import data from a MySql database to a Mongodb with out complications. // It uses the ezsql database class from Justin Vincent: // http://justinvincent.com/ezsql include_once "ezsql/shared/ez_sql_core.php"; include_once "ezsql/mysql/ez_sql_mysql.php"; class mongodb_importer { public $user; public $pass; public $databse; public $server; public function import($table_name,$mongo_db) { $db = new ezSQL_mysql($this->user,$this->pass,$this->database,$this->server); $m = new Mongo(); $mongo_db = $m->selectDB($mongo_db); $collection = new MongoCollection($mongo_db, $table_name); $res = $db->get_results("select * from ". $table_name); $i = 0; foreach($res as $r) { $i++; $collection->insert($r); } return $i; } } ?> And here it is an example about how to use this! // create a new object $importer = new mongodb_importer(); // set your Mysql information $importer->database = "my_databse"; $importer->pass = "my_secret_password"; $importer->user = "my_user_name"; $importer->server = "localhost"; // import the data $count = $importer->import("user","new_db"); // print the result echo "Imported " . $count . " records."; ?>
Category : Databases 11-04-2013 by Janeth Kent
PHP-MongoDB Beginners Guide
Over the last year or so, there's been a small revolution taking place in the database world, with the advent of "schema-less" database systems like Apache CouchDB. These databases follow a different approach to data storage as compared to the traditional relational model, and they're quickly becoming popular with Web…
Category : Databases 11-04-2013 by Janeth Kent