Solved

Setup Mac as a SQL server for application development

Posted on 2011-03-20
6
471 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 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
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 …

773 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