Glassfish + MySQL on Mac - Simple setup.
Monday Mar 31, 2008
Sun's Glassfish + MySQL bundle
Setup on MacOS
With the recent release of the Glassfish
(Application Server) and MySQL distribution, and because MacOS in not
an official supported product, I've decided to post the setup
instructions that allowed me to use this excellent combination of
technology on my MacOS machine. To access the bundle and for the
setup instructions, please see Sathyan's blog.
Configuring the Database
To start, go to the Glassfish installation directory.- For example, install under /Users/alexp/glassfish. Let's call it GF_HOME.
- cd $GF_HOME
- sudo chgrp -R mysql $GF_HOME/mysql (you will be asked to provide your login passwd).
- cd $GF_HOME/mysql
- sh ./scripts/mysql_install_db
- sudo chown mysql data
- cd $GF_HOME/mysql
- sudo ./bin/mysqld_safe --defaults-file=./mysql.ini --user=root
&
"Starting
mysqld daemon with databases from /Users/alexp/glassfish/mysql/data"
Testing the setup
To verify, you can do the following basic test as follows:- cd $GF_HOME/mysql
- ./bin/mysql -u root -p
- mysql> show databases; (shows default databases)
- mysql> create database dbstemp;
- mysql> show
databases; (it should show the dbstemp in the database
list).










