Thank you for your advice. But, I am not sure whether I can apply it on my case since these 2 switches are located on 2 different floors. Therefore, I am try to connect them via trunk port instead of switch stacking as one switch.
You can only stack using 10G, which can be done across floors however you would need fiber cable and transceivers. Looks like you just want to connect them via 1G RJ45 Ethernet instead of a stack. No Problem!
Your trunk ports should carry all relevant VLANs. In this case I guess it is only vlan2? so then for ports 1/1/12 and 1/1/24 need to add tagged vlan2;
config-vlan2#tagged eth 1/1/12 [and tagged eth 1/1/24 on other switch)
you should now be able to ping between them. Also, I'm assuming that port 1/1/1 is set as untagged i.e.