Skip to main content

Database Engine - InnoDB and MEMORY - changing MySQL database engine - localhost - PHPMyAdmin

Hello guy, today we will learn how to change the database engine in the table. This video basically changing MySQL database engine InnoDB to MEMORY.

Topic: 1) How to get all database engines? 2) How to get current using a database engine? 3) How to change the database engine in the particular table? INFORMATION_SCHEMA that provides access to database metadata, information about the MySQL server such as the name of a database or table, the data type of a column, or access privileges. A storage engine is a software module that a database management system uses to create, read, update data from a database. ... There are two types of storage engines in MySQL: transactional and non-transactional. For MySQL 5.5 and later, the default storage engine is InnoDB To change the database engine of a MySQL database table, go to your phpMyAdmin available in Site Tools. ... ALTER TABLE my_table ENGINE = InnoDB; If the query is executed properly, the database engine of the table will be changed to InnoDB.






<?php

//DB connection
include("DB_connection.php");
//$connect


//Get current database engine
$sql1 = $connect->query("SELECT TABLE_NAME, ENGINE 
                        FROM information_schema.tables 
                        WHERE TABLE_SCHEMA = 'BIT_YT'");

echo "Current database engine:<br>";
print_r($sql1->fetch_array(MYSQLI_ASSOC));
echo "<br>";

//Change database engine
$sql2 = $connect->query("ALTER TABLE students ENGINE = MEMORY");
echo "Changing DB engine<br>";
//Re-check current database engine

$sql3 = $connect->query("SELECT TABLE_NAME, ENGINE 
                        FROM information_schema.tables 
                        WHERE TABLE_SCHEMA = 'BIT_YT'");

echo "Current database engine (NEW):<br>";
print_r($sql3->fetch_array(MYSQLI_ASSOC));
echo "<br>";


Comments

Top Most viewed

How to draw circle, rectangle and triangle by canvas in Android?

Hi... friends, welcome to Bit Byte. This video is How to draw circles, rectangles, and triangles by canvas on Android? The Android Canvas provides convenient methods for drawing simple shapes such as circles and rectangles, using drawCircle and drawRect respectively, but beyond these, the majority of shapes require some custom Path logic to draw. Three shapes that I was required to draw were circle, rectangle, and triangle, so I thought I’d share how I accomplished this. And hard copy code is below this link. GitHub - https://github.com/giriArun/AndroidCanvasT1.git

Connect to MySQL with PHP in XAMPP or WAMP server || MySQL database connection with PHP

This video will discuss how to connect to MySQL with PHP. I'm using PhpMyAdmin and connect MySQL database with PHP using the WAMP server. And you can use this code any php server. . . . WampServer Version 3.1.9 64bit Created by Romain Bourdon (2005) Maintainer / Upgrade to 2.5 by Herve Leclerc Upgrade to 3 by Otomatic (wampserver@otomatic.net) Multi styles for homepage by Jojaba Installer by Inno Setup: http://www.jrsoftware.org/isinfo.php Forum Wampserver: http://forum.wampserver.com/index.php ______________________ Versions used ______________________ Apache 2.4.39 Port 80- PHP 7.2.18 MySQL 5.7.26 Port 3308 PHP 5.6.40 for CLI (Command-Line Interface) CODE:- <?php //DB connection // new mysqli(host, user, password, database name); $connect = new mysqli("localhost:3308", "bit", "bitbyte", "bit_yt"); //Check connection if($connect->connect_error){ echo "Failed to connect to MySQL: ". $connect->connect_error; exit(); } ...

AJAX call in jQuery get and post method | ajax call in PHP using jQuery | ajax call with example

In this Ajax call video, I'm trying to show how to call Ajax in jQuery using the GET or POST method. And how simple you call Ajax in PHP using jQuery. In this video, I did that with an example. I'm using the GET and POST method, and I called Ajax and got back a return value. AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script.