Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to view existing databases on remote host

Status
Not open for further replies.

bluecrush

Programmer
Mar 26, 2004
61
US
Hey all,

I am reposting this question from the PHP forum since I think I've run up against a MySQL privileges problem. But read on and maybe you can point me in the right direction! I've been trying to track down an answer to this for a couple of days now without success.

I have a website hosted by netINS.net which has MySQL but no database admin interface. [ponder] So, I checked with them to make sure it was okay if I installed phpMyAdmin...no problem, they said.

So I unzipped the package (ver. 2.9.1.1) and ftp'ed everything up to my website under phpMyAdmin. After some tweaking of the config.inc.php file, I was able to connect to their MySQL server (ver. 4.0.27-standard) [thumbsup2] .

However, in the left bar where it should show the database I know I have (db1_mydomain_com) it says "No databases" [thumbsdown] . So, I try to recreate the database that should already exist and I get the error that states "Database already exists" - no kidding [mad] .

So, obviously, phpMyAdmin can figure out that the database exists, so why can't it display in the left column? Any thoughts? I'd like to be able to select the database and view/edit it! How do I get my database(s) to show up in the left column??????

I contacted my hosting company to ask them and they said

We cannot find an issue on the server side at this moment, and were able to connect to the mysql database using the command line.

Not helpful.

Here's my config.inc.php file:

Code:
<?php


$cfg['blowfish_secret'] = 'my_super_secret_string';

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';

/* Server parameters */
$cfg['Servers'][$i]['host'] = 'mysql.myhostedserver.com';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['PmaAbsoluteUri'] = '[URL unfurl="true"]http://www.mydomain.com/phpMyAdmin/';[/URL]

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '/tmp/';
$cfg['SaveDir'] = '/tmp/';

?>

I downloaded and installed MySQL Administrator. As with phpMyAdmin I'm still unable to view my databases, but now I get an error message that says "Access denied: Must have SHOW DATABASES privilege to perform this action" or something to that effect.

Am I correct in assuming that this is a privilege that my hoster is going to have to give me? It appears that the privilege is/can be restricted by DB so I don't see any security issues with me being able to see/access other people's db's...correct?

I even switched to "config" authentication and with the "user" and "password" parameters got this message:

#1045 - Access denied for user: 'root@web.mywebserver.com' (Using password: NO)

I got the same message using the "stduser" and "stdpass" properties.

I then tried the "controluser" and "controlpass" properties and got:

#1045 - Access denied for user: 'myuserid@web.mywebserver.com' (Using password: YES)

Am I missing something?
 
I think it is likely to be a permissions issue - my guess is myphpadmin as you state does a show databases assuming that it has something like root privileges so you dont get a list of databases in the left panel.

Possibly not a problem - just have a look around the phpmyadmin code - you should be able to work out what to add to the query string to get to all the features of your database. For example


will give you show processlist on server 1 - whatever you specified as the first/only server in config.inc.php

Then just create a simple html page with a few hyperlinks on them. (To get some practice with myphpadmin and mysql I would recommend trying something like xampp very easy to install even on a windows box).

Or it may be a problem - in my example show processlist you need process_priv rights and your hosting provider may lock down your usage writes. In this instance their reply to your query should give you a clue as to what to do - switch supplier - a hosting provider who provides mysql but no way to administer it ? weird.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top