Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
If Last_IO_Errno: 0, so its fine if error like 2049 it could be password related issues
Monthly Archives: September 2020
mysql create read only user
grant select on database_name.* to 'user'@'%' identified by 'password';
ubuntu sshfs
sshfs -o allow_other,default_permissions [email protected]:/some/destination/path /some/path
apache find root
grep -i -r DocumentRoot /etc/apache2/sites-available/
grep -i -r DocumentRoot /etc/httpd/
mediawiki mysql password config file
LocalSettings.php
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "db_name";
$wgDBuser = "db_user";
$wgDBpassword = "password";
goaccess ubuntu
echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/goaccess.list
wget -O - https://deb.goaccess.io/gnugpg.key | apt-key --keyring /etc/apt/trusted.gpg.d/goaccess.gpg add -
apt update
apt install goaccess
windows check if user has admin rights
C:\>net user User
mysql master slave replication
log-bin=mysql-bin
server-id=1
innobackupex --user=root --password=password /path/to/backupdir
innobackupex --user=root --password=password --apply-log /path/to/backupdir/$TIMESTAMP/
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'remote_ip' IDENTIFIED BY 'slave_password';
server-id=2
cat /var/lib/mysql/xtrabackup_binlog_info
mysql-bin.000001 100
CHANGE MASTER TO MASTER_HOST='master_ip', MASTER_USER='repl', MASTER_PASSWORD='slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=100;
START SLAVE;
mysql> SHOW SLAVE STATUS \G
...
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
Seconds_Behind_Master: 13
Adding another slave, run on slave:
innobackupex --user=root --password=password --slave-info /path/to/backupdir
innobackupex --apply-log --use-memory=2G /path/to/backupdir/$TIMESTAMP/
On master:
GRANT REPLICATION SLAVE ON *.* TO 'repl2'@'new_slave_ip' IDENTIFIED BY 'new_slave_pass';
cat /var/lib/mysql/xtrabackup_binlog_info
mysql-bin.000001 100
CHANGE MASTER TO MASTER_HOST='master_ip', MASTER_USER='repl2', MASTER_PASSWORD='new_slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=100;
START SLAVE;
skip-slave-start
server-id=3
Use sshfs or rsync to move data
du skip directory
du -sh --exclude=/home/some/data /home
ncdu -x /home --exclude /home/some/data
new-authz error: {“type”:”urn:acme:error:unauthorized”,”detail”:”Error creating new authz :: Validations for new domains are disabled in the V1 API (https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430)”,”status”: 403}
./acme.sh –upgrade
atop history
atop -r /var/log/atop/atop_20200606
t to go forward in 10 minute
T to go backward
dpkg file belongs to package
dpkg -S /usr/bin/ssh
dpkg list installed packages
dpkg-query -l | less
mysql /etc/init.d restart not working
/etc/init.d/mysql does not start mysqld at system start up on Ubuntu
grep debian-sys-maint /etc/mysql/debian.cnf
ERROR 1045 (28000): Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)
mysql> UPDATE mysql.user SET Password = password(‘password’) WHERE User = ‘debian-sys-maint’;
service mysql restart
linux find inode usage by directory
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n