Re: hidden database issue????

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bruce wrote:
hi...

i have a situation with a server that i have. i have mysql installed with
php..

the mysql is V4.1.12. i'm trying to see/view a database from the command
line and i can't see it when i login to mysql as root. i also can't see it
when i try to login to mysql as the given user.

How are trying to see it?  That is, what command are you using?

from the php app, i see that the app makes a valid connection using:
 host    = 192.168.1.foo
 dbname  = cat
 user    = dog
 passwd  = dog

i've tracked the code, it's making the connection, and interfacing with the
database/tables...

however, when i try to access the db as either root/dog, i can't see the
database 'cat'
  mysql -udog -pdog -h192.168.1.foo
  mysql -uroot -p

Have you verified that mysql believes you are root or dog?

neither one of these approaches sems to work, ie, i can't see the 'cat'
database in the mysql list of tables...

any idea what's going on...

when i get into mysql as root, i can see/manipulate all the other databases.

thanks for any pointers/thoughts/etc...

searching google hasn't led to any solid solutions..

thanks

-bruce
bedouglas@xxxxxxxxxxxxx

Perhaps I am just misreading your statement "i can't see the 'cat' database in the mysql list of tables...", but you seem to be confusing database and table. If cat is a db, then it is not a table in the mysql db. If you are logged into mysql as a user who has access to cat, you will see it in the output of

  SHOW DATABASES;

You can set cat as the default db by issuing

  USE cat;

After that, you can see the tables in cat by entering

  SHOW TABLES;

If that's not the issue, you can confirm that you are logged in as the correct user with

  SELECT CURRENT_USER();

and you can check on said user's permissions with (using root@localhost as the user):

  SHOW GRANTS FOR root@localhost;

If I'm on the wrong track, just send any additional info needed to clarify your problem.

Michael

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux