Posts

Showing posts from January, 2021

How to install and configure MySQL on Windows

Image
MySQL is a well-established relational database management system. It is fully compatible with a Windows computer system. By using the MySQL Installer, an application designed to simplify the setup of MySQL products, MySQL can be installed and deployed within minutes. Quick Links 1. Prerequisites 2. Installation 2.1. Download MySQL Installer for Windows 2.2. Set Up MySQL Installer for Windows 2.3. Configure MySQL Server on Windows 2.3.1. High Availability 2.3.2. Type and Networking 2.3.3. Authentication Method 2.3.4. Accounts and Roles 2.3.5. Windows Service 2.3.6. Logging Options (Optional) 2.3.7. Advanced Options (Optional) 2.3.8. Apply Configuration 2.4. Complete MySQL Installation on Windows Server 3. Conclusion The article is comprehensive, rich with images, and focuses on the individual steps nee

Find maximum size from all LOB columns in a MySQL database

Quick Links 1. Create Procedure: usp_max_blob_in_db 2. Execute Procedure: usp_max_blob_in_db This article will mention a stored procedure that will help you to find maximum size from all LOB columns in a MySQL database. At the time of this writing, the LOB column in MySQL are any of the data type: 'blob', 'mediumblob', 'longblob', 'text', 'mediumtext' and 'longtext'. You can execute the below SQL procedure to find the maximum size in bytes. The stored procedure calling part contains a parameter called @p_raw_format, which acts as follows: -- Format Parameter: @p_raw_format -- Values: (0) or Any -> Result in human readable form [KB, MB, GB], (1) -> Result in raw bytes. Create Procedure Create the stored procedure usp_max_blob_in_db in the database where you need to find the maximum bytes in any LOB column. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Problem with union clause in MySQL 5.7 and its solution

As per the below mentioned change in MySQL 5.7 official documentation. Change Type Whats Changed Incompatible change In UNION statements, to apply ORDER BY or LIMIT to an individual SELECT, place the clause inside the parentheses that enclose the SELECT. Previous versions of MySQL may permit such statements without parentheses. In MySQL 5.7, the requirement for parentheses is enforced. Here is an example to make you understand this. If using 'union' with 'order by' clause without parentheses it will return error. Example : select EId,ENTId from( select te.EId,te.ENTId from t_ent te order by te.ENTId union select teli.EId,teli.ENTId from t_ent_line_item teli order by teli.ENTId )test ; Result : Error Code: 1221. Incorrect usage of UNION and ORDER BY There are two solutions. 1. use parentheses separately Example: select EId,ENTId from( (select te.EId,te.ENTId from t_ent te order by te.ENTId) union (select teli.EId,

lower case table names in MySQL and Identifier Case Sensitivity

Image
Identifier Case Sensitivity  In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Triggers also correspond to files. Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database, table, and trigger names. This means such names are not case-sensitive in Windows, but are case-sensitive in most varieties of Unix. One notable exception is mac-OS, which is Unix-based but uses a default file system type (HFS+) that is not case-sensitive. However, mac-OS also supports UFS volumes, which are case-sensitive just as on any Unix. The  lower_case_table_names system variable also affects how the server handles identifier case sensitivity, as described later in this section. Recommendation : Use lower_case_table_names=1 on all systems. Note Although database, table, and trig

Family and its importance

 I believe that many of us already know this. But for lots of us, the year 2020 has definitely reminds us of that. In this unprecedented times one thing that remains common is the love and support of the family. and I have noticed that it is only the difference in perspective that shifts all the dynamics. I will share a very simple story with you, that I believe will explain what I want to say. But first let me clear that what I mean by saying  " it is only the difference in perspective that shifts all the dynamics " I mean that when a family member says something then there is only two ways to take it. It is an interference. It is an advice generated due to general concern. Now here is the story : I had to take the bath and it is the winter season, so it was really cool around. So my mom says that you can take bath after 2 hours. I have already preparing hot water in the geyser, but that is not a big issue as I can switch it off. But instead of taking it as an interference,
Back To Top