add data to session variables laravel

reference:

https://stackoverflow.com/questions/29190058/laravel-add-and-remove-auth-session-variables

Compound Indexes

drop index INDEX_NAME on TABLE_NAME;

ALTER TABLE TABLE_NAME add index INDEX_NAME(col1, col2);

git squash – cleanly

git reset –soft $(git merge-base develop elasticsearch) && git commit -am “Full text search with Laravel Scout” && git rebase -i develop

Ansible apt update

 

search and replace from the command line

 

Xdebug remote server

https://confluence.jetbrains.com/display/PhpStorm/Remote+debugging+in+PhpStorm+via+SSH+tunnel

 

SSH tunnel is the crucial part!

Laravel sniff DB query builder

MariaDB replication with GTID

Improves resiliency of replication in case of primary crash

https://mariadb.com/resources/blog/enabling-gtids-server-replication-mariadb-100

Truncate file to 0 linux

echo > filename

InnoDB Cluster config

There is not a lot of information that is easy to understand to get innodb cluster running,

The following is the terminal dump of what I needed to do to get it working, important notes.

you must bind mysql to 0.0.0.0

prior to adding a server to the cluster execute RESET MASTER; to clear the logs.

apt install python -y
wget http://dev.mysql.com/get/mysql-apt-config_0.8.4-1_all.deb
dpkg -i ./mysql-apt-config_0.8.4-1_all.deb
apt-get update
apt-get install mysql-server mysql-shell -y

mysql_ssl_rsa_setup –uid mysql

mysqlsh

\connect [email protected]:3306

dba.configureLocalInstance();

1) Create remotely usable account for ‘root’ with same grants and password
2) Create a new admin account for InnoDB cluster with minimal required grants
3) Ignore and continue
4) Cancel

Please select an option [1]: 2
Please provide an account name (e.g: [email protected]%) to have it created with the necessary
privileges or leave empty and press Enter to cancel.
Account Name: [email protected]%

shell.connect(‘[email protected]:3306’);
var cluster = dba.createCluster(‘cluster name’, { memberSslMode: ‘REQUIRED’, ipWhitelist:’192.168.0.0/16,127.0.0.1/8′});

cluster.addInstance(‘[email protected]:3306’, { memberSslMode: ‘REQUIRED’, ipWhitelist:’192.168.0.0/16,127.0.0.1/8′});

GRANT ALL PRIVILEGES ON *.* TO ‘icroot’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
flush privileges