Tuesday, June 30, 2020

Navigating to the same component with different params + Angular 9

I share example how navigate the same component but with different params.

TS

1. On your constructor, 'type' is name of params on url, and setupComponent is a method.









2. Method setupComponent.











That it is, when you change the params on url, te value on setupComponent changes.















Monday, June 22, 2020

com.mysql.jdbc.PacketTooBigException: Packet for query is too large + Spring boot 2..

I share solution next error on Linux or windows, in my case i try save video on database, i get that error.

Update file my.cnf (linux) or my.ini (windows).

1. Go to path installation mysql

cd YOUR_PATH_INSTALLATION/mysql/bin/

#Linux
sudo nano my.cnf

#Windows console or anywhere editor, in this example i use console.
notepad my.ini

#Change next line, for default is 10M, i set 100M
max_allowed_packet = 100M


2. Stop or restart mysql.


3. conect by console mysql.

mysql -u your_user -p your_passoword

4. run next command for check max allowed packet.

SHOW VARIABLES LIKE 'max_allowed_packet';

and try again.



Sunday, June 21, 2020

Export database + mysqldump + MySql


I share example how to export database from command line, use mysql dump

A DB, then:

mysqldump -u [uname] -p db_name > db_bk.sql
   
Remote DB, then:

$ mysqldump -P 3306 -h [ip_address] -u [uname] -p db_name > db_bk.sql











Thursday, June 18, 2020

Change Apache default port to a custom port on Ubuntu or Debian


1. Change Apache port 


Edit  /etc/apache2/ports.conf file,

sudo nano ports.conf 

Find the following line:

Listen 80 

Change for example 90




Additionally, change the port number also in 000-default.conf

sudo nano /etc/apache2/sites-enabled/000-default.conf




sudo systemctl restart apache2

and try

http://IP-address:90

















Saturday, June 6, 2020

ERROR in budgets, maximum exceeded for initial. Budget 5, Angular 8

Solution next error.

Change angular.json next lines:










That it is.


I suggest you to read of references.







<--- Last few GCs ---> Angular 8

I share Solution next error.

When run next command i get next error

ng build --prod --base-href=/YOUR_CONTEXT/








Change the command for this.

node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --build-optimizer --base-href=/YOUR_CONTEXT/


That it is.








Automating Deployments with CronJobs in Google Kubernetes Engine (GKE)

In the realm of container orchestration, automation plays a pivotal role in streamlining operations. Google Kubernetes Engine (GKE) offers r...