
The easiest way to find this is to click “ Open Start page” on the MAMP control panel. The password, username and port should be shown on the opened webpage as below:
#Java code to connect to database using mamp server install
You will also need to know the settings for connecting to your database ( Database name, server, MySQL port), if you are using a standard MAMP install you can check the MySQL username, password (usually root and root) and the MYSQL port number from the default MAMP web page. Make sure you have Java installed, LibreOffice installed and MAMP running. The following instructions describe the steps to set up LibreOffice for accessing MySQL in MAMP on Macintosh but they could easily be modified for any MySQL install.


sounds like a lot but it really only results in lost data every 5 mins 🙂 (My laziness to learn something new even extends to putting up with LibreOffice quirks like relationship connections being off slightly in full screen mode, dragging a table off the bottom of the design view panel resulting in it scrolling like a bat out of hell, unintuitive saving procedures and the rainbow beachball of death if you create a dumb SQL query …. It can sometimes be easier for me to visualise the SQL relationships using a GUI editor like LibreOffice or OpenOffice. I tend to use LibreOffice, not because it’s better than other programs but because I can’t be bothered learning something new.

Most of the time I use the great Sequel Pro app from to edit SQL (it’s really fast and light) but occasionally I need to write complex SQL queries.
