The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable access database

Discussion in 'Database Discussions' started by qim, Mar 26, 2013.

  1. qim

    qim Member

    Joined:
    Mar 26, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am new to this and have some simple code to test the database, but nothing happens, I am unsure of the name of my database created through phpMyAdmin. On the left there is a Select window with options. When I open it says _agents whici sthe end of my JustHost ID. Bit below the window there is a square which appears to represent text that is calle Agents with capital "C". I am wondering if my database is called ID_agents/Agents or just ID_agents.

    When I scroll the Select window to another databse that I created to test calledID_users, a message comes up saying "No tables found in database". So, I gather that ID_agents is the database and ID_agents/Agents is the full path to the table "Agents".

    If that is so, when I try to access the table through the server (public_html) what should I include: the full path ot just the database, whcih is what I suppose they are asking for.

    Can you help, please?

    Thank you
     
    #1 qim, Mar 26, 2013
    Last edited: Mar 26, 2013
  2. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
    USERNAME_agents is the database name. What coding language are you using when attempting to access the database? Instead of accessing the database via the file path, your code will likely access the database over port 3306.
     
  3. qim

    qim Member

    Joined:
    Mar 26, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks. I have now managed to get some simple code that confirms access to the database. What I need now is to add a few lines to transfer entered data in a couple of fields into the table.

    Can you help?

    This is what I have so far, and I have an html form (registration) which I am using to test:

     
  4. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
  5. qim

    qim Member

    Joined:
    Mar 26, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Jeff

    Thanks, I'm stuck before I satrt...

    I have a table in a database at the server called 'user' it has two records with 'user' and 'password'

    I thought I could asses the data with:

    But it does not work. I guess I need to specify which record adn echo the result. can you help, please?

    Thank you
     
    #5 qim, Mar 27, 2013
    Last edited: Mar 27, 2013
Loading...

Share This Page