Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    Mar 2012
    Posts
    15
    Plugin Contributions
    0

    Default Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Hello,

    I want to connect Oracle SQL Developer to my MySql db but don't know the hostname value.


    My configuration is...
    .VM Virtualbox with:
    .Ubuntu Server 11.10 (64) with LAMP server.
    .zc 1.5


    I access my db through phpMyAdmin on the vm from http://192.168.0.107/phpmyadmin/ with no problems.


    I have already:
    1.Installed Sql Developer
    2.Installed the driver(to get the new tab in 'new connection')


    Now i need to enter:
    1. Connection name: some name for my connection
    2. Username: Same value as i use to access phpMyadmin
    3. Password: same as point 2
    4. Hostname: (defaults to 'localhost')
    5. Port: (defaults to 3306)


    My problem is that with this configuration it doesn't work.

    I'm quite a newby so probably that's why I don't see it... Not sure where to get the value I need for the localhost... can somebody pls give me a clue?

    thanks!
    Leo

  2. #2
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Have you tried using 127.0.0.1 instead of localhost

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Quote Originally Posted by leocoppens View Post
    I access my db through phpMyAdmin on the vm from http://192.168.0.107/phpmyadmin/ with no problems.

    <snip>

    Not sure where to get the value I need for the localhost..
    Gee, and you are *so* close.. You've even provided the answer yourself :)

    Hostname: ('192.168.0.107')

    Another option, is if you have a valid hosts file with something like

    192.168.0.107 MyComputer MyComputer.localdomain

    Then either
    Hostname: ('MyComputer')
    Hostname: ('MyComputer.localdomain')

    Should also both work.

    Caveate: by default MySQL only allows *user* access from 'localhost', so 1st thing you'll need to do is log into the database as the DATABASE ADMINISTRATOR, and update the Zencart DB ACCOUNT USER so they can access from anywhere (%), or, for better security, from 192.168.0.% (just your private network)
    These seeting can be found under the 'Privileges' tab via phpmyadmin.

    Cheers
    Rod.

  4. #4
    Join Date
    Mar 2012
    Posts
    15
    Plugin Contributions
    0

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Thanks for the replies guys.

    Unfortunatelly I tried both 127.0.0.1 and 192.168.0.107 and it keeps on failing. The error msg is in the following img:Click image for larger version. 

Name:	sqldev_connerr.jpg 
Views:	82 
Size:	20.7 KB 
ID:	10452

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Quote Originally Posted by leocoppens View Post
    Unfortunatelly I tried both 127.0.0.1 and 192.168.0.107 and it keeps on failing.
    Did you do this (from my previous post)...............

    "1st thing you'll need to do is log into the database as the DATABASE ADMINISTRATOR, and update the Zencart DB ACCOUNT USER so they can access from anywhere (%), or, for better security, from 192.168.0.% (just your private network) "

    If so, then which did you use? "%" or "192.168.0.%" ?

    Also, based on your screenshot I see you are trying to connect to your database as 'root'. Therefore, rather than the ZenCart DB account user, you will need to assign these permissions for user 'root' (which by default also resticts access to localhost/127.0.0.1 only).

    If that doesn't solve the problem, my next question/comment is going to be ....
    You previously stated "I access my db through phpMyAdmin on the vm" . Is your Oracle SQL Developer running on the *same* vm? (if not, then please fully explain your system. What OS is running 'bare metal'. What VM software are you using VirtualPC, VirtualBox, VMware, other?

    Is your SQL server on the virtualised machine or the native machine?
    Is your Webserver (and therefore phpmyadmin) on the virtualised machine or the native machine?
    Are you accessing phpmyadmin from the virtualised machine or the native machine?
    Is your Oracle SQL Developer running on the virtualised machine or the native machine?
    As well as '127.0.0.1' both the virtual machine and the native machine will have thier own IP addresses. What are they, and which machine is using which IP address?

    Cheers
    Rod

  6. #6
    Join Date
    Mar 2012
    Posts
    15
    Plugin Contributions
    0

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Hello Rod, Thanks a lot for your help! unfortunatelly I still didn't get it working...

    I tried going into phpMyAdmin, selecting privileges, then assigning % to each line of my root user by clicking on "Edit Privileges" as below:
    Click image for larger version. 

Name:	Privs.jpg 
Views:	51 
Size:	15.3 KB 
ID:	10455

    My configuration is the following:

    Main OS: Win7Ultimate64 (IP: 192.168.0.104)
    VM Soft: VirtualBox 4.1.14
    Machine on the VM: Ubuntu server 11.10 (IP: 192.168.0.107)
    Software on the virtualized Ubuntu: . LAMP server
    . Zen Cart


    So, what I do is access the 192.168.0.107 ip of my virtual server as if it was on the net for zen cart, for zen cart admin and for phpMyAdmin with no problems or complications, I found it nice and easy, until I tried to connect sqldeveloper to it...

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Is inbound port 3306 blocked on the vm's firewall?

    Perhaps do some searching about Ubuntu and firewall controls and port 3306 for TCP or TCP_IN ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Want to edit my zc db with sqldeveloper but cannot connect with localhost

    Quote Originally Posted by leocoppens View Post
    Hello Rod, Thanks a lot for your help! unfortunatelly I still didn't get it working...

    I tried going into phpMyAdmin, selecting privileges, then assigning % to each line of my root user by clicking on "Edit Privileges" as below:
    Click image for larger version. 

Name:	Privs.jpg 
Views:	51 
Size:	15.3 KB 
ID:	10455
    Wrong Privileges. Those you set are database speciific. A user needs ACCESS Privileges before the database-specific privileges even get a looked at.

    On the same screen that you found the Database specific settings (which you probably don't need to set, unless you wish even finer control over who can access a specific database) the next section has the Change password settings, and the one after that is the one you need to edit.
    The default is Host: Local -> localhost.
    Change this to
    Host : and from the dropdown select 'Any Host'

    Quote Originally Posted by leocoppens View Post
    My configuration is the following:

    Main OS: Win7Ultimate64 (IP: 192.168.0.104)
    VM Soft: VirtualBox 4.1.14
    Machine on the VM: Ubuntu server 11.10 (IP: 192.168.0.107)
    Software on the virtualized Ubuntu: . LAMP server
    . Zen Cart
    For best performance and reliability, I would suggest you consider reversing your Main OS and VM. IE, Run Ubuntu on bare metal and virtuialise your Win7. :) Not that this has anything to do with your problem.

    Quote Originally Posted by leocoppens View Post
    So, what I do is access the 192.168.0.107 ip of my virtual server as if it was on the net for zen cart, for zen cart admin and for phpMyAdmin with no problems or complications, I found it nice and easy, until I tried to connect sqldeveloper to it...
    As stated above, you need to set the user permissions to log on from anywhere (or, in your case, for better security, the IP address of your *Windoze* box (192.168.0.104), because that is where are connecting *from*.

    If this STILL doesn't work, then follow up on DrByte's suggestion regarding a "firewall" blocking port 3306.
    On your ubuntu server, if you type "iptables -L | grep 3306" on the command line and nothing shows then this *isn't* the machine doing the blocking.

    Offhand I couldn't tell you where to check on the Win7 machine, but it'll be somewhere under your network settings.

    Cheers
    Rod

 

 

Similar Threads

  1. v150 Cannot edit files About Us with Define Editor
    By irishshopper in forum General Questions
    Replies: 9
    Last Post: 8 Sep 2014, 04:43 PM
  2. I want to test product Downloads with the COD module..but I can't...
    By dgent in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 30 Aug 2011, 03:20 PM
  3. I installed with the example products, but I now want an empty shop
    By Lieven79 in forum Installing on a Windows Server
    Replies: 1
    Last Post: 5 Aug 2010, 10:51 PM
  4. I want to offer some products with free shipping but only for customers in USA
    By rmlawdad1 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 24 Jan 2010, 05:24 AM
  5. Sudden Unable to Connect to Localhost
    By johnd in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Jun 2007, 02:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR