Solved

Setup Mac as a SQL server for application development

Posted on 2011-03-20
6
466 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
  • 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 82

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 82

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 82

Expert Comment

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
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 > …
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now