Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setup Mac as a SQL server for application development

Posted on 2011-03-20
6
Medium Priority
?
476 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 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

916 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