Thursday, January 26, 2023
Friday, January 20, 2023
Command line script to import data from csv file to local database mysql
LOAD DATA LOCAL INFILE 'C:/mysql_import/2021_22/[DB_NAME]/gmail_data_attempt_01.csv'
INTO TABLE [table_name]
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
Linux Basic Command Collection 1
| ===================================== | |
| Basic command | |
| ===================================== | |
| sudo su - // instantly gets root rights | |
| ssh-keygen // generate both ssh private and public key | |
| cat ~/.ssh/id_rsa // read default ssh private key | |
| cat ~/.ssh/id_rsa.pub // read default ssh public key | |
| pwd // see the current path | |
| ls -al // to see all file and directory whatever attribute | |
| env // see all environment variable and the corresponding value | |
| man [commandn name] //see all about the command | |
| =================================== | |
| linux permission | |
| ==================================== | |
| There are 3 type of patten #_ _ = owner , _#_ = group , _ _ # = other | |
| There are 3 type of permission 1 = execute , 2 = write , 4= read | |
| if you want to give all permission to owner then : 1+2+4=7 | |
| if you want to give all permission to group tehn : 1+2+4=7 | |
| if you want to give all permission to other then : 1+2+4=7 | |
| command is : | |
| chmod 777 [filename] | |
Your java application unable to send the email after deploy in tomcat9 webserver
| Issue | |
| =========== | |
| Title - server is not sending the email through your appliation | |
| Descrp - sometimes the tomcat server installed in linux system is not able to send the email throgh your deployed webapplication | |
| even if you tested in local windows machine | |
| Solution | |
| =========== | |
| soource - https://serverfault.com/questions/1062435/cannot-send-emails-from-tomcat-application | |
| The problem was with the last versions of Java. | |
| I had installed openjdk 1.8.0_292, since _291, doesn't allow TLS 1.0 and 1.1, protocol that Gmail has by default until today. | |
| So, to be able to solve my problem without install another versions of java, I had edited the file /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security | |
| And commented that part: | |
| #jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \ | |
| #DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \ | |
| #include jdk.disabled.namedCurves | |
| And add this part right after: | |
| jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \ | |
| DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \ | |
| include jdk.disabled.namedCurves1 | |
| As you can see, the java had explicity disabled some protocols, returning the COULD NOT CONVERT SOCKET TO TLS error. | |
| Hope this help others who may find that problem. |
Getting Lock wait timeout exceeded try restarting transaction even though I m not using a transaction
Error :
I'm running the following MySQL UPDATE statement:
mysql> update customer set account_import_id = 1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
Solution :
Let's see the list of the current processes, one of them is locking your table(s):-
mysql> show processlist;
Finally, kill one of these processes:-
mysql> kill <process id>
Subscribe to:
Posts (Atom)
Easy way to completely uninstall python
The process is only for Windows OS 1) run the following command from cmd pip list // list out the all the package pip freeze > require...
-
Error : I'm running the following MySQL UPDATE statement: mysql> update customer set account_import_id = 1; ERROR 1205 (HY000): Lock...
-
Need to allow outbound traffic in aws
-
===================================== Basic command ===================================== sudo su - // instantly gets root rights ssh-k...