Solved

Setup Mac as a SQL server for application development

Posted on 2011-03-20
6
473 Views
Last Modified: 2012-08-13
Hi,

I am new to using a macbook. I have Mac OS X 10.6 installed on my mac. I wanted to create a java application for which I need to maintain a database on my machine. I would prefer to use any SQL database as that is my area of expertise. Any pointers on how I can setup my mac as a SQL database server and then use JDBC to connect to the database for my application?

I tried the MySQL open source database but I have absolutely no clue on how I go about installation and setup on the mac. Any help will be greatly appreciated.

Thanks in advance for the help.

Regards
Ali.
0
Comment
Question by:bhagatali
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 

Author Comment

by:bhagatali
ID: 35176366
Ok..I have been able to setup the MySQL sever on my mac. I have also been able to create a table and insert data into it. Now my problem is...

When I access MySQL from my user login (I am the only user on my machine so I am assuming I am admin), I am only able to create tables in the "test" database. If i try to create a new schema, I get a not authorized error message:


mysql> create table test.sample (name char(10));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into test.sample values ('Ali');
Query OK, 1 row affected (0.01 sec)

mysql> select * from test.sample;
+------+
| name |
+------+
| Ali  |
+------+
1 row in set (0.00 sec)

mysql> create schema pcc;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'pcc'

mysql>

I then tried to enable "root user" on my machine. When I log in from the root user I am able to create a schema. The schema created from root user is not accessible when I log back in with my profile.

Any pointers?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35176381
Go to http://dev.mysql.com/downloads/mysql/#downloads and select "Mac OS X" on the drop down and select the DMG version that matches your computer.  Here's the installer instructions: http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-pkg.html

Then download the JDBC connector from the link list on the Connector page.  Assumes you already have JAVA installed.
0
 

Author Comment

by:bhagatali
ID: 35176399
Thanks Dave. Just before you wrote in your reply, I was able to complete the instructions to setup MySQL on mac. I posted another question on which any help would be appreciated.
0
Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 125 total points
ID: 35176499
You need to learn about creating users and permissions.  http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
0
 

Author Closing Comment

by:bhagatali
ID: 35177955
Thanks for the link. I was all over the website and wasn't able to drill down to what I actually needed.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35178084
You're welcome.  Thanks for the points.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Steve Jobs once said that Blu-ray is "a bag of hurt". As Macs users well known, things haven’t settled down (at least not from Apple’s perspective). Several years after that comment, Mac OS X still doesn’t support Blu-ray playback, nor has any Mac s…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question