Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setup Mac as a SQL server for application development

Posted on 2011-03-20
6
Medium Priority
?
475 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 84

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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 375 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 84

Expert Comment

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

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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 > …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

721 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