473,699 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about show databases;

Hi everyone. I just installed MySQL on my home PC and I tested out the
show databases query, and it lists two:

information_sch ema
bbdatabank

The second one is one I created myself, but I don't understand what the
first one is. It is not listed in my 'data' folder, but mysql and test
*are*, yet they aren't listed when I type the show command. Why is that?
How can I get them listed so that I can use them, and what is the
information_sch ema?

Thanks!
John
May 21 '06 #1
3 1972
>Hi everyone. I just installed MySQL on my home PC and I tested out the
show databases query, and it lists two:

information_sc hema
bbdatabank

The second one is one I created myself, but I don't understand what the
first one is. It is not listed in my 'data' folder, but mysql and test
*are*, yet they aren't listed when I type the show command. Why is that?
Unless you have the "show databases" privilege, you can only see
databases you have some privileges on.
How can I get them listed so that I can use them, and what is the
information_sc hema?


Use a username and a password with privileges to use them (e.g. the
root account set up when you installed MySQL).

information_sch ema is a database giving information on the databases
and stuff in them. Another way of getting a list of databases is
"select schema_name from information_sch ema.schemata". It is
automatically generated from the databases, so if you create or
delete tables or columns in them, it's automatically up to date.
On the other hand, it tends to be a bit slow if you list a whole
table.

Some of the information in information_sch ema is sensitive to privileges.
You may not see the rows for things you don't have access to.

Gordon L. Burditt
May 22 '06 #2
Gordon Burditt wrote:

Use a username and a password with privileges to use them (e.g. the
root account set up when you installed MySQL).

information_sch ema is a database giving information on the databases
and stuff in them. Another way of getting a list of databases is
"select schema_name from information_sch ema.schemata". It is
automatically generated from the databases, so if you create or
delete tables or columns in them, it's automatically up to date.
On the other hand, it tends to be a bit slow if you list a whole
table.


Thank you! I realized that I wasn't seeing mysql or test because I
wasn't signed in as the root account. As for the other question, thanks
for explaining. I'll just leave it alone! :)
May 22 '06 #3
>> information_sch ema is a database giving information on the databases
and stuff in them. Another way of getting a list of databases is
"select schema_name from information_sch ema.schemata". It is
automatically generated from the databases, so if you create or
delete tables or columns in them, it's automatically up to date.
On the other hand, it tends to be a bit slow if you list a whole
table.


Thank you! I realized that I wasn't seeing mysql or test because I
wasn't signed in as the root account. As for the other question, thanks
for explaining. I'll just leave it alone! :)


information_sch ema does have its uses. For example, it's easy to
list all the tables with a 'stamp' column in them. And information_sch ema
is a bit less MySQL-specific than various "SHOW" commands, and you
can put a WHERE clause on the queries.

It *is* a really good idea to leave information_sch ema alone when
using mysqldump or restoring the output of mysqldump.

Gordon L. Burditt
May 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4491
by: Tom Jones | last post by:
I need to use php's native mssql api in order to read the meta data from an entire DBMS ... I have sql server 2000 up and running and using the provided browsing tools poked around and found that the databases in the system were listed under a database named "master" in a table named "sysdatabases" ... there is a "syscolumns" table there too but it looks like i need specific info about the architecture of sql server's inner workings to use...
2
1702
by: j-marvin | last post by:
hi- i just went to ipowerweb.com to set up my db. it has an easy web interface. what is confusing me is i bought a mysql book and i thought there was all this administration i had to worry about. for i.e. messing with grant tables and setting privileges. the interface at ipowerweb seems so easy compared to what the book gets into. is it possible that the web interface provided by my host is all i need to worry about?
2
5046
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
2
1312
by: mark | r | last post by:
I have shared hosting that can support SQL databases. i currently use access. whats the process in... a. converting access to sql b. uploading the database file is it the same as access, where i just ftp the .sql file online or is it more complicated (i dabbled with mysql databases and that was a text based nightmare - i hope MS Sql isnt as difficult) mark
0
1177
by: Vladimir Trebicky | last post by:
Hi, I've been trying to solve this problem for a long time. Only thing I did when upgrading from 3.25 to 4.0.14 I took the default my.cnf. I did not convert the privilege tables with mysql_fix_privilege_tables. Suddenly, the mysql started to show all databases to all users (even though the user had access denied and could not do show tables on them). So I started to find help and tried the mysql_fix_privilege_tables. It didn't work...
7
4151
by: chessplayer | last post by:
Greetings Folks, I am trying to understand how DB2 locks data and can't believe my eyes. Have read the literature about the difference isolation levels and have a general understanding about intent, update, share and exclusive locks. I am working on the sample database tables and using the default isolation level of CS.
3
2743
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command that I can use instead? Cheers Nicolaas
2
2018
by: Calvin | last post by:
I'm fairly new to programming, that said, I know how to 'program', but my question is about design. How big and what sort of objects should be stored in Session. I'm doing an e-commerce website, and I've created an xsd based around the shopping cart, customers details and the order's tables. The resulting dataset is then populated accordingly and stored in session. Is this bad news? I ask because the articles I read suggest limiting...
1
3857
by: judy | last post by:
I have several databases that are used to collect data for different client-projects. My intention was to collect the data, and administer mySQL so each client could see only their data. Each of these databases used to collect data have the same tables. There are other databases which are available to all the users which contain common information. The command "show databases" lists all of the databases (visible to the particular...
0
8703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8893
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7773
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4389
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.