Monday 15 May 2023

Make bootable Mac OS usb for 2011 iMac, 2012 MacAir,

 This USB fixed my issue of creating a bootable MAC OS USB

https://www.youtube.com/watch?v=64IOWM8ezyk


1. Download High Sierra 10.13 from https://support.apple.com/en-gb/HT211683 2. Go to Application Admins-MacBook-Air:~ root# /Applications/Install macOS High Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Usb32 --applicationpath /Applications/Install macOS High Sierra.app Ready to start. To continue we need to erase the volume at /Volumes/Usb32. If you wish to continue type (Y) then press return: y Erasing Disk: 0%... 10%... 20%... 30%...100%... Copying installer files to disk... Copy complete. Making disk bootable... Copying boot files... Copy complete. Done.

Wednesday 23 November 2022

PHP Tuning / PHP Config

After install, getting lot of Warning / Notice in my application e.g. Notice: Undefined index: isimg in /Library/WebServer/Documents/myproject/products/prodList.php on line 459 Fix was changed following var in php.ini From error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT To error_reporting=E_ALL & ~E_NOTICE Don't forget to restart apache for the change to take effect. On my Mac17 files in vi /Applications/XAMPP/etc/php.ini

Saturday 6 August 2022

MySQL change sroage for all tables

MySQL move from MyISAM to InnoDB Simple dynamic SQL to change stoage type in MySQL SELECT concat('alter table ', table_name, ' engine=innodb;') SQL_strg FROM information_schema.tables WHERE table_schema = 'db_dev_db' and engine='MyISAM';

Thursday 26 May 2022

Tomcat & JDBC error connecting to 19c

ORA-28040: No matching authentication protocol
This is quite generic error.
This fixed worked for me.
  • 1. Find the JDBC driver that is being used, jdbc.jar can reside in many location e.g.
    1. $CATALINA_HOME/lib/
      webapps/myApp/WEB-INF/lib
  • 2. Updated the correct JDBC in your location
  • 3. Restart tomcat
  • Thursday 17 February 2022

    Count Actual Rows of Every Tables (MySQL)

    On root database run, 1st change to your_db_name: SELECT CONCAT('SELECT ''',table_name,''', COUNT(*) FROM ', table_name, ' union all') FROM information_schema.tables WHERE table_schema = 'your_db_name'; Then connect to your database and remove the last 'union all' and add ';' then run sql e.g. MariaDB > use db_dev_01; MariaDB [db_dev_01]> SELECT 'APPLICATIONS', COUNT(*) FROM APPLICATIONS union all -> SELECT 'ATTRIBUTE', COUNT(*) FROM ATTRIBUTE union all .... .... .... -> SELECT 'ZBS_LOG', COUNT(*) FROM ZBS_LOG;

    Thursday 10 February 2022

    Mac Mini MySQL 5.6 start stop

    MySQL 5.6 on Mac Start / Stop # launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist # launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist # mysql -u root -p Update config to tune MySQL cache cd /etc vi my.cnf

    Mac MySQL tuning - basic

    mysql> show variables like 'query_cache_%' ; +------------------------------+---------+ | Variable_name | Value | +------------------------------+---------+ | query_cache_limit | 1048576 | | query_cache_min_res_unit | 4096 | | query_cache_size | 1048576 | | query_cache_type | OFF | | query_cache_wlock_invalidate | OFF | +------------------------------+---------+ 5 rows in set (0.07 sec) Above is 1MB for both _limit and _size My 2022 Tuning setting # cd /usr/local/mysql # vi my.cnf query_cache_limit = 2M query_cache_size = 256M query_cache_type = 1 innodb_buffer_pool_size=1G mysql> show variables like 'query_ca%'; +------------------------------+-----------+ | Variable_name | Value | +------------------------------+-----------+ | query_cache_limit | 2097152 | | query_cache_min_res_unit | 4096 | | query_cache_size | 268435456 | | query_cache_type | ON | | query_cache_wlock_invalidate | OFF | +------------------------------+-----------+ 5 rows in set (0.00 sec) Start Stop MySQL (5.6.22) on Mac mini Catalina # /usr/local/mysql/support-files/mysql.server stop Shutting down MySQL . SUCCESS! # /usr/local/mysql/support-files/mysql.server start Starting MySQL .. SUCCESS! # On my 2022 install, Mac Mini (2012) i5, 8GB