Spring Boot UTF-8 encoding (VS Code)

Hello There!In order to enable UTF-8 encoding on spring boot application, using VS code, follow these steps, Add below code in application.xml/yml server: port: 8022 servlet: context-path: /CMNRFQ encoding: charset:…

Change date format in MYSQL

Sometimes the situation may demand to change the MYSQL date format, when we are using select query. MYSQL has builtin functions for this purpose, take a look at example below…

How to kill all mysql process

Use the below query to get all the process SELECT CONCAT('KILL ',id,';') AS run_this FROM information_schema.processlist WHERE user='your database username' Here replace 'your database username' with your actual database username,…

MYSQL subquery with case statement

Subqueries are used to get values from multiple tables in a single query, based on conditions. We can also combine these subqueries with case statements like the exmaple below. Example…

MYSQL connection_control plugin installation

MYSQL connection_control plugin installation on windows INSTALL PLUGIN CONNECTION_CONTROL SONAME 'connection_control.dll'; INSTALL PLUGIN CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS SONAME 'connection_control.dll'; Replace .dll with .so for non windows SHOW VARIABLES LIKE '%connection_control_%' These are the…

HITTING URL AND READING JSON RESPONSE IN JAVA

In this example, we going to hit a URL and read its response String urlString = "http://gd.geobytes.com/GetCityDetails"; URL url = new URL(urlString); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); //or url.getContent();…