问题
I am familiar with using MAMP but I now need to setup a MySQL and Oracle database locally of which I will need to connect to both from the same PHP file.
Can anyone point me in the right direction to get started with this?
回答1:
There is an old version of Oracle (10g R2) for an old version of Mac OS X (10.5). I wouldn't go there, as nothing has changed since 2005.
I installed a VirtualBox running Oracle's Database App Development VM: http://www.oracle.com/technetwork/community/developer-vm/index.html
回答2:
MySQL
Get MySQL from here. Once DMG file is downloaded install it.
For step-by-step, refer this.
Oracle
Download from here and for step-by-step installation refer this, this and this.
回答3:
Don't install Oracle locally on your system. Get VirtualBox and install one of the pre-built VM appliances from here after that you can install MySQL into this VM.
It is way better because system updates will not touch your installation, you can move it to another machine. And you don't need to worry about starting up, shutting down, etc.
回答4:
Setting up Oracle Database Mac OS X
- Make your virtual machine uses Bridge Mode not NAT for networking.
- Download "Oracle Database 11g Express Edition" on your virtual machine OS.
- Find the ip address of your virtual machine.
- Download latest JDK for Mac
- Download Oracle SQL Developer Downloads on your mac.
- Enter informations like this:
Connection Name: YourConnectionName Password: What you made when you install Oracle DB Express Hostname: Virtual machine ip address Port: 1521 SID: xe
来源:https://stackoverflow.com/questions/13645199/setup-mysql-and-oracle-database-mac-os-x