SitePoint Sponsor

User Tag List

Results 1 to 18 of 18
  1. #1
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    determining which database is which script?

    Hi -

    My host allows me to set up 5 MYsql databases on my account. Over the course of time, I've set up all 5 but don't need/aren't using all 5. The only problem is I'm not sure which db is set up for which script and I need to delete one to use for a current script I want to install.

    How can I find out which database is being used for what script? I'm just not sure!

    Thanks.

    Josh

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most scripts have some sort of config file (usually named config) that will store the database details including the name. If you look at each script's file you will be able to see what database it is using

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you need specific help, don't hesitate to PM and I would be happy to take a quick look for you
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  4. #4
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Sean,

    Thanks for the reply. That solved the problem in locating 2 php scripts, but is there now a way (perhaps in my hosting user control panel or through ftp) to view a specific database to see what info is there, because I'm not sure what other programs (if any at this point) are using the other 3 databases?

    Thanks again.

    Josh

  5. #5
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look for a script called phpMyAdmin in your control panel

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  6. #6
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The closest thing to PhpMyAdmin in my control panel was this: << Below are all of the Perl modules that are currently installed and available for you to use on your virtual server account: >> (all ending in .pm) and I found that because somewhere else it said that I can access the databases through these modules ... only problem is I have no idea how to do that!!

    Josh

  7. #7
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you know what type of control panel it is ..cpanel4 etc..?? That would really help
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  8. #8
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is 'Personal Control Panel 4.1 XL' from CommuniTech.Net

  9. #9
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone else have a way I can identify 2 of the 5 databased I'm currently using? Problem is I don't know what programs/scripts (if any at this point) are using them. So I need to figure out a way, either in my CP (or ftp?) to do it?? Can anyone suggest something?

    thanks. Josh

  10. #10
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry, but I am not familiar with that particular control panel so it is very hard for me to tell you exactly how you do it....as someone else mentioned, you could install phpMyAdmin (http://phpmyadmin.net) I believe... and that should definatly help....
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  11. #11
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to determine the last modified date for a MySQL DB? (easy with Access, obviously)

    If so, then you merely have to update the DB within a script, and then see which DB has just been updated! Then you can delete the others.

    However, determining the correct database by examining the scripts is by far the best option, since perhaps more than one database is being used - besides which it is always useful to gain a greater understanding of a 3rd party application!!
    Last edited by M@rco; Jul 29, 2002 at 12:26.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  12. #12
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been trying to get a reply from the message boards that my host, Communitech, provides, and I'm still a little unsure of how to proceed.

    I was told to use telnet and quote: "What you can use the "grep" command. Use "man grep" in the UNIX shell for help on the command."

    Uhm, is this possible? Will this help dtermine which db is using what script? I've never used telnet, although I have it on my computer and was able to login, but then I didn't know how to proceed!

    Thanks for shedding any light on my situation.

    Josh

  13. #13
    SitePoint Wizard Goof's Avatar
    Join Date
    Feb 2001
    Location
    Pittsburgh, PA
    Posts
    1,154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm...try what the msg board told you: login to the telnet session and type man grep. The man command is short for manual, so it will provide you with documentation for the grep command (I'm not THAT formilliar with xNix, nor have I ever heard a a grep command, so you'll have to read what the manual says about it).

    Edit:


    Can you get into the MySQL shell environment? It looks like there is a MySQL command called mysqlshow that does exactly what you want. (Unfortunately I have never use MySQL so I cannot advise you further.)


    Hope that helps,
    Goof
    Last edited by Goof; Jul 29, 2002 at 08:07.
    Nathan Rutman
    A slightly offbeat creative.

  14. #14
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    better yet, just type:

    mysql -u (type username) -p
    (hit enter)
    it should ask you for a password - enter it
    once it's logged in, type:

    show databases;

    then you can use sql commmands, such as select, show tables etc.
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  15. #15
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugghhh!

    So I'm trying to do all this through telnet... I typed msql -u (usename) -p ... it asked for password then says "ERROR 2000: Access denied for user 'u229@localhost' (Using Password: YES)"

    Is it possible that my host, Communitech, doesn't allow me to connect this way?? I didn't realize this process would be so difficult! I just need to peek into 2 of my db's to see what script they're using.....!

    Thanks.

    Josh

  16. #16
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know if this info helps but...

    I found this in my control panel (perhaps someone can further explain what this means/ how I actually use it?!):

    << For security purposes, CommuniTech.Net does not allow remote connections to the MySQL database server. However, you can connect to your MySQL databases via PHP as well as Perl using DBI and/or the MySQL Perl modules, both of which are provided on your account. >>

    Josh

  17. #17
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it is possible that they blocked remote access via telnet, although i highly doubt it. I assume that you tried to do it more than once, in case you typed your password wrong?

    Also, remember that your password for the hosting accounr is probably different than your mysql user password!
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  18. #18
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, as my last resort, I wound up calling tech support and they were extremely helpful and courteous with my issue.

    He walked me through it and told me how to use 'Putty' to access the databases I needed, and thus I solved the problem!

    Thanks all for helping me along!

    Josh


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
  •