homepage Welcome to WebmasterWorld Guest from 54.166.8.138
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Database lost!
edzillion




msg:3834630
 11:31 am on Jan 26, 2009 (gmt 0)

I have some php scripts editing, updating and reading from a database that is on my server.
Previously I could use webmin to have a look at the tables etc, but after an OS reinstall this database does not show up in either cPanel or phpmyadmin. The scripts work fine so the db is there, but I cannot edit/manage it.
Any ideas?

 

janharders




msg:3834683
 1:02 pm on Jan 26, 2009 (gmt 0)

is phpmyadmin/cpanel connecting to the right mysql-server?
I know phpmyadmin has a function to restrict access to certain databases, maybe the one you "lost" is not in that list?

edzillion




msg:3834706
 2:01 pm on Jan 26, 2009 (gmt 0)

well the server is described as 'localhost' in both my code:

$con = mysql_connect("localhost","$dbusername","$dbpasswd") or die

and in phpmyadmin: ' Server: localhost'

but as I say, there is no sign of my dbase. How do I check the 'restrict access' list you mention?

janharders




msg:3834712
 2:13 pm on Jan 26, 2009 (gmt 0)

that'd be in the config-file of phpmyadmin. also: localhost is just "this machine", so if phpmyadmin runs on another machine than your scripts, localhost would mean different boxes ...
in phpmyadmin, choose some database, go to sql (where you can run your own queries) and run "SHOW DATABASES"

it should list all the databases on the host. IIRC, even if a user is not allowed to access a certain database, he should still see it. so if your database doesn't show up there, you're looking at two different servers.

edzillion




msg:3834844
 5:12 pm on Jan 26, 2009 (gmt 0)

well AFAIK phpmyadmin is running on the same server. It has to be, right? I get to it through cpanel which is definitely on the same server.

When I tried that SHOW DATABASES I just got the same list as on the phpmyadmin home page.

janharders




msg:3835384
 8:07 am on Jan 27, 2009 (gmt 0)

I'm not familiar with cpanel, but I just tested and found out I was wrong, a user can only "see" the databases he's allowed to access (guess the "see all"-thing was mysql 3.x or 4.x, I remember it was there at some point...) so maybe the user you're using in phpmyadmin is just not allowed to access the database?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved