Found 4378 Articles for MySQL

Mean and Mode in SQL Server

Narendra Kumar
Updated on 10-Feb-2020 10:08:33

1K+ Views

Problem statementMean is the average of the given data set calculated by dividing the total sum by the number of values in the data set.Mode of a data set is the value that appears most frequently in a series of dataIf our dataset is {1, 2, 3, 4} then mean value is − (1 + 2 + 3 + 4) / 4 = 2.5If our dataset is {1, 2, 3, 4, 1, 1, 1, 1} then mode value is − 1 as it appears 5 times.ExampleFirst, create a table −CREATE TABLE NUMBERS (    value INT )Insert data into the ... Read More

MySqldb Connection in Python

Pradeep Elance
Updated on 04-Feb-2020 06:44:47

221 Views

Mysql is one of the most widely used open source Dbs. Python provides ways to connect to this DB and use the DB to store and retrive the data from it.Install pymysqlDepending on the python environment you are using, pymysql package can be installed using one of the following methods.# From python console pip install pymysql #Using Anaconda conda install -c anaconda pymysql # Add modules using any python IDE pymysqlConnecting to MySqlNow we can connect to the Mysql environment using the following code. After connecting we are finding out the version of the DB.Exampleimport pymysql # Open database connection ... Read More

Important MYSQL Performance Tuning and Settings after Installation

Sharon Christine
Updated on 24-Jan-2020 09:50:49

456 Views

In this article, we will learn and discuss some important performance tuning settings for MySQL which we need to implement after the MySQL Installation better and speedy performance.Pre-requisitesAssuming that we have already installed the MySQL, I am providing some tips before we start to know about Performance tuning settings for MySQL.Even experienced IT persons may make some mistakes which will lead to many problems, so before we apply any recommendations which are shown in this article, we will keep the below items in mind to avoid issues or problems.We will apply only one setting at a time so that we ... Read More

How to Install and Configure MS SQL (Beta) on CentOS 7

Samual Sam
Updated on 23-Jan-2020 07:57:45

307 Views

In this article, we will learn about – How to install and configure MS SQL on CentOS 7. Microsoft has recently announced that they are planning to release the MS SQL for Linux. Specially the beta versions for RedHat enterprises Linux, Centos & Ubuntu but only with 64-bit editions.PrerequisitesA machine with a minimum of 4 GB RAM and 30 GB Hard disk space.A machine installed with CentOS 7.A user with root privileges or root user.MS SQL Server installation on CentOSSince MS SQL is not available with the default CentOS repository, we needed to add the MS SSQL repository details to ... Read More

Print all odd numbers and their sum from 1 to n in PL/SQL

sudhir sharma
Updated on 22-Jan-2020 09:46:19

2K+ Views

In this problem, we are given a number n and we have to print all odd numbers from 1 to n and also print the sum of numbers from 1 to n in PL/SQL.PL/SQL is a procedural language extension to SQL. The code is a sequence of instructions that are ground in a block with all related declarations and instructions.Let’s see an example of our problem −Input: 7 Output: odd numbers are: 1, 3, 5, 7 Sum of odd numbers is 16To solve this problem, we will take a number and initialize it to 1 and a sum variable with ... Read More

How to Migrate MySQL to MariaDB on Linux?

Sharon Christine
Updated on 22-Jan-2020 08:21:42

324 Views

This article will help you to migrate the database from MySQL to MariaDB as the binary compatibility of MySQL-to-MariaDB in the migration process is very much straightforward.After the Oracle’s acquisition of MySQL, the community has driven an outcome of such movement and developed a new database called MariaDB. MariaDB is the open-source and its compatibility with MySQL. Most of the Linux distributions (RH, CentOS, Fedora) have already started to use the support of MariaDB as a drop-in replacement of MySQL.If we want to migrate the database from MySQL to MariaDB then this article will help.Preparing a MySQL Database and TablesWe ... Read More

How To Change The MySQL Data Directory to Another Location on Ubuntu 16.04

Sharon Christine
Updated on 21-Jan-2020 08:05:52

1K+ Views

In this article, we will learn how to change the MySQL Data Directory or relocate the MySQL Database data to the new location, this situation may be used when the database is growing very fast, or for some security reasons we want to move the data directory to the new location.PrerequisitesAn Ubuntu machine with a non-root user with Sudo permission.MySQL installed and working.A new volume or location where we want to move the database data location, the new location will be /mnt/data_vol/MySQL as the data_vol is the new volume attached to the machine or server.Changing the MySQL Data Folder LocationBefore ... Read More

How to Setup SSL for MySQL Server and Client on Linux

karthikeya Boyini
Updated on 20-Jan-2020 12:04:59

765 Views

In this tutorial, I will be explaining about – how to set up a secure connection to MySQL server using an SSH connection for encryption so that data in the database will be in safe and which is impossible for hackers to steal the data. SSL is used to verify the means of SSL certificates which can protect against phishing attacks. This will also show you – how to enable SSL on MySQL server also.Enabling SSL SupportConnect to the MySQL server and check that SSL status of the MySQL server# mysql -u root -p mysql> show variables like '%ssl%'; Output: ... Read More

How To Install and Setup Sphinx on Ubuntu 16.04

Sharon Christine
Updated on 20-Jan-2020 10:27:28

332 Views

In this article, we will learn about how to install and setup Sphinx on Ubunt 16.04, Sphinx is an open source search engine which allows for full test searches, and is best in performing searches with a huge data very effectively where the data can be from any sources, (Ex − SQL Databases, plain text files, etc., )Features of the SphinxAdvanced indexes and good tool for querying.High Searching performance and indexes.Advances result for post-processing.Easily scalable with advanced searches.Can be integrated with SQL and XML sources.Can be scalable for handing the huge data with 1000’s of queries.PrerequisitesBefore we begin we needed ... Read More

Review of Magento Platform – Content Management System

Sharon Christine
Updated on 17-Jan-2020 12:29:43

139 Views

Magento is a fastest growing open source eCommerce platform that uses MySQL and Zend PHP databases. Magento is a very flexible eCommerce platform that facilitates powerful marketing, Management of multiple websites, catalogue management, and integration of Google Website Optimizer and over 50 payment gateways. It gives the flexibility for the users to control the content, look and functionality of the ecommerce.Magento was originally developed by Varien Inc., a US private company in California. Today, some of their largest users are Burger King, Nestle, Murad, BevMo, and Coca-Cola. Magento open source CMS platform provides increased control in terms of merchandising to ... Read More

Advertisements