AmitDiwan has Published 10744 Articles

Connect to MySQL database from command line

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 06:54:22

4K+ Views

Let us understand how MySQL can be connected to the database using the command-line. This is done for clients like mysql or mysqldump.The below command invokes mysql without specifying any explicit connection parameters −mysqlSince there are no parameter options, the default values will be applied −The default host name is ... Read More

Getting Minimum and Maximum Value in MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 06:51:46

1K+ Views

We need to use the MAX(columnName) to find the Maximum value in a column, whereas use the MIN(columnName) to find the Maximum value in a column.Let’s say following is the syntax to find the highest and lowest value in a specific column −mysql> SELECT @min_val:=MIN(columnName), @max_val:=MAX(columnName) FROM tableName; mysql> SELECT ... Read More

The Row Holding the Maximum of a Certain Column in MySQL

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:29:09

143 Views

Let us understand how to find the row that holds the maximum of a specific column in MySQL −Note: We assume we have created a database named ‘DBNAME’ and a table named ‘tableName’.Let us see how to fetch the row that holds the maximum value of a specific column using ... Read More

Find the Maximum Value in a Column in MySQL

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:26:03

456 Views

We need to use the MAX(columnName) to find the Maximum value in a column. But, at first, we will understand about database and tables in MySQL.Before installing MySQL, it is important to determine which version and which distribution format (it could be a binary file or from source files) should ... Read More

Using MySQL with Apache

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:20:51

1K+ Views

Let us understand how to use MySQL wth Apache −Apache is a web server software which is developed and maintained by Apache software foundation. It is a software that takes requests from user to access a web page.A few security checks are performed on the HTTP request and then takes ... Read More

Using MySQL in Batch Mode

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:18:55

2K+ Views

MySQL can be run in batch mode. To perform this, the statements that need to be executed should be put in a file and then ‘mysql’ should be indicated to read the input from this file. It can be done as shown below −shell> mysql < batch−fileIf mysql is running ... Read More

Connecting to and Disconnecting from the MySQL Server

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:14:08

1K+ Views

A MySQL user name needs to be provided when ‘mysql’ is invoked. Next a password has to be entered. If the server runs on a system which is not the same as that on which the user logs in, the host name also needs to be provided while trying to ... Read More

Entering MySQL Queries

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:13:36

526 Views

Before entering queries on the console, it is important to ensure that the user is connected to the server. The below query would give the version number of the server being used, and the current date.mysql> SELECT VERSION(), CURRENT_DATE;Note: The function ‘VERSION()’ and ‘CURRENT_DATE’ are case−insensitive. This means ‘version()’, ‘Version()’, ... Read More

Upgrading MySQL with the MySQL SLES Repository

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:10:56

147 Views

MySQL can be upgraded using MySQL SLES repository. Let us see the steps required for this upgradation. By default, the MySQL SLES repository updates MySQL to the latest version in the release series that the user would have chosen during installationTo update to a different release series, the subrepository for ... Read More

Upgrading MySQL with the MySQL APT Repository

AmitDiwan

AmitDiwan

Updated on 08-Mar-2021 12:10:31

190 Views

The MySQL APT repository can be used to perform an in-place upgrade for the MySQL installation.It can be done using the below steps −Upgrade MySQLEnsure that MySQL APT repository is already present on user’s system's repository list.Ensure that the most up−to−date package information on the MySQL APT repository is present ... Read More

Advertisements