Sling Academy
Home/MySQL/MySQL Tutorials: From Basic to Advanced

MySQL Tutorials: From Basic to Advanced

This series of tutorials covers everything you need to know about MySQL, a popular open-source relational database management system.

1 How to install/update MySQL on Windows

2 How to install/upgrade MySQL in Mac OS

3 How to make comments in MySQL statements (3+ approaches)

4 How to Execute an SQL File in VS Code

5 Where does MySQL 8 store data?

6 How to set up phpMyAdmin (Windows, Mac OS, Ubuntu)

7 What are the Default Username and Password for phpMyAdmin

8 How to completely uninstall MySQL from your system

9 How to use MySQL with Docker and Docker Compose

10 How to Set Connection Timeout in MySQL 8

11 Understanding interactive_timeout and wait_timeout in MySQL 8

12 How to interact with MySQL using command line

13 How to Install and Configure MySQL on Ubuntu 23.04

14 How to check your current MySQL version (Windows, Mac OS, Ubuntu)

15 MySQL 8: Ways to reset root password in Windows

16 MySQL 8: 3 Ways to Reset Root Password in macOS

17 MySQL 8: 2 Ways to Reset Root Password in Ubuntu

18 MySQL 8: How to create a new user with root privileges

19 MySQL 8: How to grant privileges to a user for a database

20 MySQL 8: How to revoke/restrict privileges from a user

21 Managing users and roles in MySQL 8: A practical guide

22 Using ENUM in MySQL 8: A Practical Guide (with Examples)

23 4 Ways to Create a New Database in MySQL 8

24 Ways to Rename a Database in MySQL 8 (3 Ways)

25 3 Ways to Drop a Database in MySQL 8

26 MySQL 8: 3 ways to see all databases in the server

27 MySQL 8: How to select a database to work with command line

28 MySQL: 4 Ways to list all tables in a database.

29 Data Types in MySQL 8: A Comprehensive Cheat Sheet

30 MySQL 8: How to create a table with auto-increment ID

31 Unsigned integer vs signed integer in MySQL 8: Explained with examples

32 MySQL: 3 ways to see the structure of a table

33 Ways to Rename a Table in MySQL 8

34 How to Drop a Table in MySQL 8 (Basic & Advanced)

35 How to empty a table in MySQL 8 (erase all data but keep the table structure)

36 How to add/remove columns to/from a table in MySQL 8

37 MySQL 8: How to rename a column of a table

38 MySQL 8: How to change charset and collation of a table

39 MySQL 8: How to change charset of a whole database

40 MySQL 8: Ways to Dump a Database to an SQL File

41 MySQL 8: 3 ways to import an SQL file to a database

42 MySQL 8: How to export a database to a CSV file

43 MySQL 8: How to export a database to a JSON file

44 What is the default port of MySQL server

45 What is MySQL Workbench and how to use it

46 MySQL 8: Can a table store 100 million rows

47 How to insert a new record into a table in MySQL 8

48 How to mass insert data into a table in MySQL 8

49 MySQL 8: How to Insert Text with Quotes into a Table

50 Using SELECT Statement in MySQL 8: A Comprehensive Guide

51 How to duplicate a table in MySQL 8

52 MySQL: Using WHERE clause in SELECT statement

53 MySQL: Using LIMIT and OFFSET to get a subset of records

54 MySQL: Using ORDER BY to sort records in SELECT statement

55 MySQL: How to Sort Rows by Multiple Columns

56 MySQL: How to Select DISTINCT Rows

57 MySQL: How to count the number of rows by a condition

58 Using AND & OR operators in MySQL 8: A Practical Guide

59 Using LIKE and NOT LIKE operators in MySQL 8: A Practical Guide

60 Using Loops in MySQL: A Practical Guide (with Examples)

61 MySQL 8: How to compare values (greater than, less than, equal to, etc.)

62 MySQL 8: How to use aliases for columns and tables in SELECT statement

63 MySQL 8: Add column with default value to an existing table

64 MySQL: How to reset the AUTO_INCREMENT value of a table

65 MySQL 8: How to get the size of a database

66 Using SHOW and DESCRIBE statements in MySQL 8: A Practical Guide

67 How to update rows in a table in MySQL 8

68 How to delete rows from a table in MySQL 8

69 MySQL 8: Adding, Removing, and Changing Indices of a Table

70 Understanding UNIQUE constraint in MySQL 8: A Developer’s Guide

71 MySQL 8: How to search for a string in all tables of a database

72 MySQL 8: How to perform case-insensitive string comparison

73 Using Regular Expressions in MySQL 8: The Complete Guide

74 How to perform full-text search in MySQL 8

75 Using CONCAT function in MySQL 8: A Practical Guide

76 Using SUBSTRING function in MySQL 8: A Practical Guide

77 Using REPLACE function in MySQL 8: A Practical Guide

78 Using UPPER and LOWER functions in MySQL 8: A Practical Guide

79 Using REVERSE function in MySQL 8: A Practical Guide

80 Using CHAR_LENGTH and LENGTH functions in MySQL 8

81 How to escape special characters in MySQL 8

82 Using GROUP BY clause in MySQL 8: A Beginner’s Guide

83 MySQL 8 Aggregate Functions: SUM, AVG, MIN, MAX, COUNT

84 MySQL 8: Count rows in each group with GROUP BY and COUNT

85 MySQL: Eliminate orphan rows in one-to-many relationships

86 MySQL 8: Find the min/max value in each group

87 MySQL 8: Find the sum/average of values in each group

88 MySQL 8: CHAR, VARCHAR, TEXT, and BLOB data types – explained with examples

89 MySQL 8: INT, TINYINT, SMALLINT, MEDIUMINT, BIGINT data types – explained with examples

90 DOUBLE and FLOAT data types in MySQL 8: Explained with examples

91 DATE and TIME data types in MySQL 8: Explained with examples

92 MySQL 8: Timestamps with timezone – Explained with examples

93 MySQL 8: created_at and updated_at columns – A practical guide

94 MySQL 8: How to Group Data by Day, Month, and Year

95 MySQL 8: How to select rows from the last 7 days, 30 days, etc.

96 DEFAULT & ON UPDATE TIMESTAMP in MySQL 8: Explained with examples

97 CURDATE() and CURRENT_DATE() in MySQL 8: Explained with examples

98 CURTIME() and CURRENT_TIME() in MySQL 8: Explained with examples

99 NOW() and CURRENT_TIMESTAMP() in MySQL 8: Explained with examples

100 UNIX_TIMESTAMP() and UTC_TIMESTAMP() in MySQL 8: Explained with examples

101 Extracting date/time parts in MySQL 8 with built-in functions

102 TIMESTAMPDIFF() in MySQL 8: Get the difference between two timestamps

103 DATEDIFF() and TIMEDIFF() in MySQL 8: Get the difference between two dates/times

104 How to subtract Date/Time values in MySQL 8

105 How to add a time interval to a date value in MySQL 8

106 How to Create Custom Collations in MySQL

107 MySQL: How to Remove FOREIGN KEY Constraints

108 MySQL: How to add a calculated column to SELECT query

109 How to format date/time values in MySQL 8

110 How to convert a string to date/time in MySQL 8

111 FROM_UNIXTIME() in MySQL 8: Convert a UNIX timestamp to a date

112 The HAVING clause in MySQL 8: A Practical Guide

113 How to Monitor Query Latency in MySQL 8

114 Using Index Scans for Sorts in MySQL 8: A Practical Guide

115 Multicolumn Indices in MySQL 8: A Practical Guide

116 MySQL: How to deal with redundant and duplicate indices

117 MySQL 8: How to clean unused indices in a database

118 MySQL 8: How to find and replace table corruption

119 Table partitioning in MySQL 8: A Practical Guide

120 How to implement cursor-based pagination in MySQL (3 examples)

121 Using UNION operator in MySQL 8: The Complete Guide

122 How to execute subqueries in MySQL 8: A Practical Guide

123 MySQL: IS NULL and IS NOT NULL operators – Explained with examples

124 Using BETWEEN operator in MySQL 8: A Practical Guide

125 MySQL: Selecting rows between two dates/times – A Practical Guide

126 MySQL: IN and NOT IN Operators – Explained with Examples

127 Understanding CHECK constraint in MySQL 8: A Practical Guide

128 One-to-Many Relationship in MySQL 8: A Practical Guide

129 Working with FOREIGN KEY in MySQL 8: A Developer’s Guide

130 Many-to-Many Relationship in MySQL 8: A Practical Guide

131 MySQL: Creating a Fixed-Size Table by Using Triggers

132 Cross Join in MySQL 8: A Practical Guide

133 Inner Joins in MySQL 8: A Practical Guide

134 Left Join in MySQL 8: A Practical Guide

135 Using LEFT JOIN with GROUP BY in MySQL 8: A Practical Guide

136 Right Join in MySQL 8: A Practical Guide

137 Views in MySQL 8: A Comprehensive Guide

138 MySQL 8: Using OVER() to define a window frame in a query

139 Using ROW_NUMBER() function in MySQL 8: A Practical Guide

140 Using RANK() and DENSE_RANK() in MySQL 8: A Practical Guide

141 MySQL 8: FIRST_VALUE(), LAST_VALUE(), and NTH_VALUE() functions – Explained with examples

142 Using LEAD() and LAG() functions in MySQL 8: A Practical Guide

143 Using GROUP_CONCAT() function in MySQL 8: A Practical Guide

144 Using NTILE() function in MySQL 8: A quick Guide

145 Using the EXPLAIN statement in MySQL 8

146 MySQL Upsert: Update if exists, insert if not

147 MySQL: ON DUPLICATE KEY UPDATE Statement – Explained with Examples

148 MySQL 8: INSERT IGNORE statement – Explained with examples

149 How to Set Expiration Date for a Record in MySQL 8

150 How to Auto Backup MySQL Database to Google Drive

151 MySQL 8: Using ROLLUP modifier with GROUP BY clause

152 Replication in MySQL 8: A Comprehensive Guide

153 MySQL: How to migrate a database to a new server

154 Cascade delete in MySQL 8: A Practical Guide

155 MySQL 8: How to count rows in related tables

156 MySQL 8: Sorting rows in table A by column in table B

157 How to read log files in MySQL 8

158 MySQL 8: How to create a replica using Percona XtraBackup

159 MySQL 8: How to create a replica using mysqldump

160 MySQL 8: Creating a replica using mydumper and myloader

161 Using ‘BEFORE INSERT’ trigger in MySQL 8: A Practical Guide

162 Using ‘AFTER INSERT’ trigger in MySQL 8: A Practical Guide

163 Using ‘AFTER UPDATE’ trigger in MySQL 8: Tutorial & Examples

164 Using ‘AFTER DELETE’ trigger in MySQL 8: Explained with examples

165 Transaction, commit, and rollback in MySQL 8: A Practical Guide

166 MySQL 8: How to enable/disable remote connections

167 JSON Data Type in MySQL 8: Tutorial & Examples

168 Using JSON_EXTRACT() function in MySQL 8 (with examples)

169 Working with JSON_ARRAY() function in MySQL 8

170 Understanding JSON_OBJECT() function in MySQL 8

171 Working with JSON_INSERT() function in MySQL 8

172 Using JSON_REPLACE() Function in MySQL 8

173 Making use of the JSON_REMOVE() function in MySQL 8

174 MySQL 8: Using JSON_SET() function to insert or update a JSON document

175 How to Prevent SQL Injection in MySQL 8: Explained with Examples

176 Pivot tables in MySQL 8: A Practical Guide

177 MySQL 8: Get the ID of the last inserted row

178 MySQL 8: Get the latest row of each group with GROUP BY (3 approaches)

179 Working with Self-Referencing and Self-Join in MySQL 8

180 MySQL 8 Example: Storing Categories and Subcategories in a Single Table

181 MySQL 8: How to Limit Results in Each Group

182 MySQL 8: How to concatenate multiple rows into a single string

183 MySQL 8: 5 ways to check if a row exists in a table.

184 MySQL 8: 3 ways to remove duplicate rows from a table

185 4 Ways to Select a Random Row in MySQL 8

186 How to efficiently select N random rows in MySQL 8

187 MySQL 8: Set a fallback value for NULL columns in SELECT statement

188 How to check constraints of a table in MySQL 8

189 MySQL 8: 4 Ways to Fill Missing Values in a Table

190 The Right Way to Store an Array in MySQL 8

191 Spatial Data Types in MySQL 8: A Practical Guide

192 Spatial Functions in MySQL 8: A Comprehensive Guide

193 MySQL 8: The right way to store location (latitude, longitude) in a table

194 MySQL 8: Calculate the distance between two locations (latitude, longitude)

195 MySQL 8: Set a custom starting value for AUTO_INCREMENT column

196 How to import a CSV file into a table in MySQL 8

197 MySQL 8: Searching Values in a String Separated by Comma

198 MySQL 8: UPDATE on a SELECT query in multiple tables

199 MySQL 8: Using string interpolation in a query (with examples)

200 Best practices for naming tables and columns in MySQL 8

201 MySQL 8: Get a list of dates between two given dates

202 MySQL 8: How to select all columns except password column

203 How to Define and Use Variables in MySQL 8

204 Using IF…THEN Statements in MySQL 8

205 Using CASE-WHEN statements in MySQL 8: A Practical Guide

206 MySQL 8: Using WHERE, GROUP BY, and HAVING together in a query

207 MySQL 8: How to query column names of a table

208 MySQL 8: How to add a prefix to auto-incremented column values

209 How to execute recursive SELECT queries in MySQL 8

210 How to correctly save Emoji in MySQL 8

211 How to use the WITH clause in MySQL 8: Tutorial & Examples

212 MySQL 8: How to update multiple tables in a single query

213 Using Hash Indexes in MySQL: A Practical Guide

214 MySQL: Using R-Tree Indexes for Spatial Data Types

215 Understanding Full-Text Indexes in MySQL

216 Partial Indexes in MySQL: A Practical Guide