I always have this problem when I come back to using mysql.
How do I find out what mysql databases I have set up?
The mysql daemon (mysqld) is running, I can run 'mysql' and I get the 'mysql>' prompt but that's it, there seems ot be no simple way of finding out what databases there are there to use.
On 5/20/05, Chris Green chris@areti.co.uk wrote:
I always have this problem when I come back to using mysql.
How do I find out what mysql databases I have set up?
The mysql daemon (mysqld) is running, I can run 'mysql' and I get the 'mysql>' prompt but that's it, there seems ot be no simple way of finding out what databases there are there to use.
In postgresql it is simply typing \l (as in "l" for list) at the psql prompt. You can also \h for a list of useful commands. Worth a try, anyway! Jen
Chris Green wrote:
The mysql daemon (mysqld) is running, I can run 'mysql' and I get the 'mysql>' prompt but that's it, there seems ot be no simple way of finding out what databases there are there to use.
At the mysql> prompt:
show databases;
will reveal what databases there are. Of course, depending on the location of your MySQL installation (mine is /var/lib/mysql) you can see the database files themselves.
Regards,
Martyn
On Fri, May 20, 2005 at 12:36:12PM +0100, Martyn Drake wrote:
Chris Green wrote:
The mysql daemon (mysqld) is running, I can run 'mysql' and I get the 'mysql>' prompt but that's it, there seems ot be no simple way of finding out what databases there are there to use.
At the mysql> prompt:
show databases;
will reveal what databases there are. Of course, depending on the location of your MySQL installation (mine is /var/lib/mysql) you can see the database files themselves.
Thanks, that's what I needed. Why doesn't 'help' at the mysql prompt tell you that most useful command?! (I realise the help is only showing the interpreter commands rather than the SQL ones but they might make an exception for 'show')