MySQLi Articles

Page 12 of 341

Major Contributors to MySQL

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 304 Views

Let us see who the major contributors to MySQL are −Although Oracle Corporation and/or its affiliates own all copyrights in the MySQL server and the MySQL manual, we wish to recognize those who have made contributions of one kind or another to the MySQL distribution. Contributors are listed here, in somewhat random order −Gianmassimo Vigazzola − They helped with the initial port to Win32/NT.Per Eric Olsson − They provided for constructive criticism and real testing of the dynamic record format.Irena Pancirov − Helped with the Win32 port with Borland compiler. They also helped with the mysqlshutdown.exe and mysqlwatch.exe.David J. Hughes ...

Read More

Upgrading MySQL Binary or Package-based Installations on Unix/Linux

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 403 Views

Let us understand how MySQL binary and package-based installations can be upgraded in Unix or Linux. This can be done in-place as well as by using a logical upgrade method. Let us understand both these methods in brief −In place upgradeAn in−place upgrade involves shutting down the old MySQL server, replacing the old MySQL binaries or the packages with the new ones.Once this is done, the MySQL server is restarted on the existing data directory.After this, the remaining parts of the existing installation, that require some kind of upgrade, are upgraded.For some Linux platforms, MySQL installation from RPM or Debian ...

Read More

How To Check MySQL Version

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 891 Views

Let us understand how to check the version of MySQL that the user is currently running −Before entering queries on the console, it is important to ensure that the user is connected to the server.Check MySQL VersionThe 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()’, ‘vERsion()’, all mean the same. Same goes with ‘CURRENT_DATE’QueriesLearn about MySQL QueriesAn SQL query is followed by a semi−colon.When a query is issued to mysql, it sends the query to the server ...

Read More

Installing MySQL from source on linux

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 690 Views

Linux supports many different methods to install MySQL. Only one of the distributions from Oracle needs to be used out of the many installations available.StepsType − Apt, set up method−Enable the MySQL Apt repositoryType − Yum, set up method−Enable the MySQL Yum repositoryType − Zypper, set up method−Enable the MySQL SLES repositoryType − RPM, set up method−Download a specific packageType − DEB, set up method−Download a specific packageType − Generic, set up method−Download a generic packageType − Source, set up method−Compile from sourceType − Docker, set up method−Use Docker Hub for MySQL Community Edition; download Docker image for MySQL Enterprise ...

Read More

Dealing with Problems Compiling MySQL

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 257 Views

Some problems with compiling MySQL could be because of not configuring properly. Hence, the solution is to reconfigure.If CMake is run right after it was previously run, there is a possibility that it would use information that was gathered from its previous call. This information is present in CMakeCache.txt. When CMake begins, it looks for this file and reads the contents (if it exists), assuming that the information is correct. This assumption becomes wrong when the file is reconfigured.Each time CMake is run, ‘make’ has to be executed again to recompile. The old object files from previous builds can be ...

Read More

Getting Information About MySQL Databases and Tables

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 276 Views

It is possible for the user to forget the name of the database or table or the structure of table or the name of the columns. This issue can be solved using MySQL since it supports many statements that provide information about the databases and tables which it supports.The ‘SHOW DATABASES’ query can be used to list all the databases that are managed by the server. To see which database is currently in use, the ‘DATABASE()’ function.Let us understand this query in the below section −Querymysql> SELECT DATABASE();Output+---------------------+ | DATABASE()          | +---------------------+ | databaseInUse     ...

Read More

List down all the Tables in a MySQL Database

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 769 Views

Let us understand how to list down all the tables in a MySQL database −Once a database is created, we can access and use a specific database, using the following query −Querymysql> USE databaseName Database changedThe ‘USE’ statement doesn’t require a semi-colon. This is similar to the ‘QUIT’ statement. Even if semi-colon is used, it does no harm. We can create and use a database of our own, but before that, MySQL administrator’s permission is required.The MySQL administrator can execute a command as shown below to provide permissions −mysql> GRANT ALL ON tableName.* TO ‘your_mysql_name’@’your_client_host’;Here, ‘your_mysql_name’ refers to the MySQL ...

Read More

Connect to MySQL database from command line

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 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 localhost.The default user name is ODBC on Windows.No password is sent because neither --password nor -p has been mentioned.For mysql, the first non-option argument is considered the name of the default database. Since there is no such argument, mysql selects no default database.To specify the host name, user name and ...

Read More

Getting Minimum and Maximum Value in MySQL

AmitDiwan
AmitDiwan
Updated on 09-Mar-2021 2K+ 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 * FROM tableName WHERE columnName=@min_val OR columnName=@max_val;Note: Let’s say we have a database named ‘StudentsRecords’ and a table named ‘STUDENT.Following is our table −StudentIdStudentMarksS00190S00297S00372We will now write the query −Querymysql> SELECT @min_val:=MIN(StudentMarks), @max_val:=MAX(StudentMarks) FROM STUDENT; mysql> SELECT * FROM STUDENT WHERE StudentMarks =@min_val OR StudentMarks =@max_val;Output+---------------------+ | StudentMarks   ...

Read More

The Row Holding the Maximum of a Certain Column in MySQL

AmitDiwan
AmitDiwan
Updated on 08-Mar-2021 186 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 a MySQL query −This can be done using the subquery. Here, we are fetching the maximum value of colName3 −QuerySELECT colName1, colName2, colName3 FROM tableName WHERE colName3=(SELECT MAX(colName3) FROM tableName);Output+--------------+--------------+--------------+ | colName1 | colName2 | colName3 | +--------------+--------------+--------------+ ...

Read More
Showing 111–120 of 3,404 articles
« Prev 1 10 11 12 13 14 341 Next »
Advertisements