Link to home
Start Free TrialLog in
Avatar of eejk
eejk

asked on

mysql.exe in windows doesnt show all databases with 'show databases;' command

I am using a database viewer and can see all my databases, but in mysql.exe, I can only see 'information_schema'

in windows xp
Avatar of eejk
eejk

ASKER

how can I find an answer.
Can you post the output of below statements.. replace the username with the actual mysql user thru which you are logging and seeing the databases..

show grants for username;
show grants for username@localhost;
show grants for username@'%';
Avatar of eejk

ASKER

Error for

mysql -u root;
mysql -u root -p;
show grants for username;
show grants for username@localhost;
show grants for username@'%';


ERROR 1044 <42000>: Access denied for user ' '@'localhost' to database 'mysql'

There shouldn't be semicolon for the command..remove it and login and check the output of GRANT commands...

mysql -u root
mysql -u root -p

Pls let me know..
Avatar of eejk

ASKER

doesnt allow me to end the statement without a ;
>>doesnt allow me to end the statement without a ;

Are you running below command on MySQL prompt?

shell>mysql -u root -p

Once you are logged to MySQL using above command... you will see a welcome message and mysql prompt.. run the grant command there..

mysql>
mysql>show grants for username;
Avatar of eejk

ASKER

I am using windows.

i am using mysql.exe
  --- getting the welcome message

How can use cmd prompt

or what command-line tools for windows do you recommend
command line tools from windows are shipped with mysql distribution. check mysql/bin folder... to login and execute commands on windows you need mysql command line utility.. just login to mysql and execute the grant command to see why you are not able to see other databases.. reason is you don't have enough rights for this.
Avatar of eejk

ASKER

can I do the sudo command to give myself rights

how..?

maybe by using cygwin
Pls don't get confused with mysql root and linux/unix root user. They are entirely different altogether.

To get the rights..you must login to MySQL with a user who can GRANT(root user has this rights) and GRANT ALL rights to the user.

Thanks,
Umesh
Avatar of eejk

ASKER

root is my only user


I can use mysql database editor

but I cant login to mysql command line

the only command I can do is
show databases;
and I only see 'information schema'
Login to MySQL as root (from shell prompt )


mysql -u root -p

Once you see welcome message.. execute (mysql> is mysql prompt)..send me the output of this

mysql>show grants for root;
mysql>show grants for root@localhost;
mysql>show grants for root@'%';
Avatar of eejk

ASKER

how would I do this from start->run->cmd

also, I have xampp and wamp and different mysql tables  viewable from mysql database viewer

cant only see 'information schema' on mysql.exe from xampp
ASKER CERTIFIED SOLUTION
Avatar of Umesh
Umesh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial