mysql_secure_installation – MySQL Script

mysql-mysql_secure_installation

mysql_secure_installation – MySQL Script mysql_secure_installation is a shell script available on Unix systems, and enables you to improve the security of your MariaDB or MySQL installation in the following ways: You can set a password for root accounts. You can remove root accounts that are accessible from outside the local host. You can remove anonymous-user accounts. … Read more

Install MySQL 8.0

How to Install MySQL 8.0 on CentOS 7 MySQL is an open-source free relational database management system (RDBMS) released under GNU (General Public License). It is used to run multiple databases on any single server by providing multi-user access to each created database. Step 1: Adding the MySQL Yum Repository 1. We will use the … Read more

MySQL JOINS

MySQL JOINS MySQL JOINS are used with SELECT statement. It is used to retrieve data from multiple tables. It is performed whenever you need to fetch records from two or more tables. There are three types of MySQL joins: MySQL INNER JOIN (“or sometimes called simple join”) MySQL LEFT OUTER JOIN (“or sometimes called LEFT … Read more

MySQL Conditions

MySQL AND Condition The MySQL AND condition is used with SELECT, INSERT, UPDATE or DELETE statements to test two or more conditions in an individual query. Syntax: WHERE condition1 AND condition2 … AND condition_n; Parameter explanation: condition1, condition2, … condition_n: Specifies all conditions that must be fulfilled for the records to be selected. MySQL AND Example The following … Read more

MySQL GROUP BY Clause

MySQL GROUP BY Clause The MYSQL GROUP BY Clause is used to collect data from multiple records and group the result by one or more column. It is generally used in a SELECT statement. You can also use some aggregate functions like COUNT, SUM, MIN, MAX, AVG etc. on the grouped column. Syntax: SELECT expression1, expression2, … expression_n, aggregate_function (expression) … Read more

MySQL ORDER BY Clause

MySQL ORDER BY Clause The MYSQL ORDER BY Clause is used to sort the records in ascending or descending order. Syntax: SELECT expressions FROM tables [WHERE conditions] ORDER BY expression [ ASC | DESC ]; Parameters expressions: It specifies the columns that you want to retrieve. tables: It specifies the tables, from where you want to retrieve records. There must be at least one table … Read more

MySQL FROM Clause

MySQL FROM Clause The MySQL FROM Clause is used to select some records from a table. It can also be used to retrieve records from multiple tables using JOIN condition. Syntax: FROM table1 [ { INNER JOIN | LEFT [OUTER] JOIN| RIGHT [OUTER] JOIN } table2 ON table1.column1 = table2.column1 ] Parameters table1 and table2: specify tables used in the MySQL statement. The two tables are joined based on table1.column1 = table2.column1. … Read more

MySQL Distinct Clause

MySQL Distinct Clause MySQL DISTINCT clause is used to remove duplicate records from the table and fetch only the unique records. The DISTINCT clause is only used with the SELECT statement. Syntax: SELECT DISTINCT expressions FROM tables [WHERE conditions]; Parameters expressions: specify the columns or calculations that you want to retrieve. tables: specify the name of the tables from … Read more

MySQL WHERE Clause

MySQL WHERE Clause MySQL WHERE Clause is used with SELECT, INSERT, UPDATE and DELETE clause to filter the results. It specifies a specific position where you have to do the operation. Syntax: WHERE conditions; Parameter: conditions: It specifies the conditions that must be fulfilled for records to be selected. MySQL WHERE Clause with single condition Let’s … Read more