1. Project setup 1.1 Dependency Add MyBatis Spring Boot starter to pom.xml. <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.3.1</version> </dependency> 1.2 Data source configuratio...
Confgiuring multiple databases in a single Spring Boot application with MyBatis requires defining separate DataSource, SqlSessionFactory, and SqlSessionTemplate beans per database, and mapping each mapper package to the appropriate factory/template. Maven dependencies <dependencies> <depend...
Measure storage use in the Zabbix schema Identify which tables consume the most space before pruning. SELECT t.table_name AS tbl, ROUND((t.data_length + t.index_length) / 1024 / 1024, 2) AS size_mb FROM information_schema.tables AS t WHERE t.table_schema = 'zabbix' ORDER BY size_mb DESC; Large footp...
macOS Catalina (10.15) ships with Apache and several scripting languages preinstalled, but the following setup uses Nginx, Homebrew PHP 7.4, MySQL 8, and Redis. The default shell is zsh; commands assume ~/.zshrc for shell configuration. Terminal and IDE Install iTerm2 by dragging the app into /Appli...
Required dependencies application.properties: define two data sources and poooling Java configuration for both data sources MyBatis mappers for each data source Controller endpoints to verify both connecsions Sample project layout and test URLs Dependencies <!-- MySQL JDBC driver --> <depe...
When a replica halts because the SQL thread encounters an error, you can resume replication by skipping the problematic event(s). Two common approaches are available. Methods to Skip Errors 1) Skip a specific number of events Use SQL_SLAVE_SKIP_COUNTER to advance the SQL thread past N events. Skip o...
Environment macOS 10.13.3 Docker 17.12.0-ce Image: mysql:5.7.21 Example container: CONTAINER ID: 478bbac9137b IMAGE: mysql:5.7.21 PORTS: 0.0.0.0:3306->3306/tcp NAMES: mysql.5.7.21.plus Start the container and connect as root Start the MySQL container and connect from the host using the MySQL clie...
When Zabbix server starts and reports Z3001 with "Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’", it typically means Zabbix is pointing too a socket path that does not exist or differs from the one MySQL/MariaDB actually created. Symptom Example log excerpt...
When installing MySQL from Oracle’s .deb packages on Ubuntu, dpkg can leave the server unconfigured if a required library (libmecab2) isn’t present. This typically shows up when installing multiple local packages in one go. Example install command (local .deb files): sudo dpkg -i ./mysql-common_*.de...
When working with MySQL 8.0, you might encounter the following issue during remote connection attempts: # mysql -h10.254.73.103 ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No suc...