PHP MySQL Database Connection

php-mysql

PHP 5 and later can work with a MySQL database using: MySQLi extension (the “i” stands for improved) PDO (PHP Data Objects) Earlier versions of PHP used the MySQL extension. However, this extension was deprecated in 2012. Open a Connection to MySQL   Example: <?php $servername = “localhost”; $username = “username”; $password = “password”; // … Read more

MySQL Index : Understanding MySQL indexing

MySQL Cluster

What is Indexing? A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. While creating index, it should be considered that what are the columns … Read more

Creating Views in MySQL : How to create mysql views

MySQL Cluster

Summary: in this tutorial, you will learn how to create views in MySQL by using the CREATE VIEW statement. Introduction to CREATE VIEW statement The syntax of creating a view in MySQL is as follows:   1234 5   CREATE[ALGORITHM = {MERGE  | TEMPTABLE | UNDEFINED}]VIEW [database_name].[view_name]AS [SELECT  statement] Algorithms The algorithm attribute allows you to control which mechanism is used when … Read more

phpMyAdmin : What is phpMyAdmin?

phpmyadmin

phpMyAdmin is one of the most popular applications, free and open source tool written in PHP, Intended to handle the administration of MySQL with the use of a web browser.  phpMyAdmin also supports a wide range of operations on MySQL, MariaDB and Drizzle. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be … Read more

How Does MySQL Replication Works?

mysql replication process

Of course, there are many aspects of MySQL replication, but my main focus will be the logistics – how replication events are written on the master, how they are transferred to the replication slave and then how they are applied there. Note that this is NOT a HOWTO setup replication, but rather a how stuff works type … Read more

mysqldump – MySQL Database Backup and restore program

MySQL Cluster

What is mysqldump The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, … Read more

How to reset mysql root password

MySQL Cluster

it is quiet easy to reset mysql root password, here are the steps SSH as root to your machine Turn off the mysqld daemon if running RedHat/Fedora users can do so by executing:  service mysqld stop Run safe_mysqld by executing:        safe_mysqld –skip-grant-tables (this will run allow you to connect without a password) 4. … Read more