echo > filename
Truncate file to 0 linux
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 root@localhost: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: icroot@%) to have it created with the necessary
privileges or leave empty and press Enter to cancel.
Account Name: icroot@%
shell.connect(‘icroot@i1:3306’);
var cluster = dba.createCluster(‘cluster name’, { memberSslMode: ‘REQUIRED’, ipWhitelist:’192.168.0.0/16,127.0.0.1/8′});
cluster.addInstance(‘icroot@i2: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
Redis promote slave to master
https://redis.io/commands/slaveof
ansible run playbook with sudo password as extra var
ansible-playbook upgrade.yml --extra-vars "ansible_sudo_pass=MAGICAL_PASSWORD"
Ansible disk space
ansible <host>, -m shell -a "df -H"
What to do when MySQL or MariaDB shits the bed
Had a server outage mid transaction?
Now you can’t start MYSQL ?
You probably have a transaction stuck and the service won’t come back up until you deal with it…
Here is how you deal with it.
mysqld --tc-heuristic-recover=ROLLBACK
service mysql start
set connection multi-source Mariadb replication
SET @@default_master_connection=”
mariadb db replication reset
tecadmin.net/reset-re-sync-mysql-master-slave-replication
Updating listview – android
Calling
notifyDataSetChanged
Is not enough when updating the content of cells. The only way to guarantee data is updated correctly, and tags are set correctly is to setAdapter(newAdapter instance)
Android adb location
~/Library/Android/sdk/platform-tools/adb install app-release.apk
to debug
http://stackoverflow.com/questions/38167117/how-to-debug-inapp-billing-in-android
Recent Comments