Re: What is the "default database"?

2004-12-20 Thread Dr. Frank Ullrich
Michael, Gleb,
thanks a lot for your hints!
Now I know that "default database" means "current database".
And I did not find Section 13.3.2 in the fine manual because I searched 
for "default database" and we find the string "default (current) 
database" there  :-( .

Regards,
Frank.
Michael Stassen schrieb:
Gleb Paharenko wrote:
Hello.

I searched a while but could not find an explanation.
So the question remains:
what is the "default database"?

See:
  http://dev.mysql.com/doc/mysql/en/mysql_select_db.html

While it does explain default database, that page documents a function 
in the Mysql C API.  That seems a strange place to send someone asking 
about character sets and ALTER TABLE, not C programming.  Surely we can 
find better references.  For example:

Set the default: USE dbname
.
What is the default: SELECT DATABASE()

Michael


--
Dr. Frank Ullrich, DBA Netzwerkadministration
Heise Zeitschriften Verlag GmbH & Co KG, Helstorfer Str. 7, D-30625 Hannover
E-Mail: [EMAIL PROTECTED]
Phone: +49 511 5352 587; FAX: +49 511 5352 538
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: What is the "default database"?

2004-12-17 Thread Gleb Paharenko
Hello.



Oops, yes, perhaps I was thinking about some[body] else while answering %-)

Sure, the last USEd database is the default one and that's a simplier 

way to understand the concept of a default database. Thank you.



And it's friday! :-) 



[EMAIL PROTECTED] wrote:

> 

> I guess that translates (for those users not using the C API) to mean 

> whatever database was last "USE"ed ?  So if I say "USE Mydatabase", is 

> "Mydatabase" now the default database or does the concept of default 

> database only apply to those users using the C API?

> 

> Shawn Green

> Database Administrator

> Unimin Corporation - Spruce Pine

> 

> Gleb Paharenko <[EMAIL PROTECTED]> wrote on 12/17/2004 07:59:30 

> AM:

> 

>> Hello.

>> 

>> 

>> 

>> > I searched a while but could not find an explanation.

>> 

>> > So the question remains:

>> 

>> > what is the "default database"?

>> 

>> See:

>> 

>>   http://dev.mysql.com/doc/mysql/en/mysql_select_db.html

>> 

>> 

>> 

>> 

>> 

>> 

>> 

>> "Dr. Frank Ullrich" <[EMAIL PROTECTED]> wrote:

>> 

>> > Hi,

>> 

>> > 

>> 

>> > I came across this term several times while reading about character 

> set 

>> 

>> > and collation handling, e.g. in the last paragraph of the online 

> manual 

>> 

>> > section 10.3.2 

> (http://dev.mysql.com/doc/mysql/en/Charset-database.html):

>> 

>> > "

>> 

>> > The character set and collation for the default database are available 

> 

>> 

>> > as the values of the character_set_database and collation_database 

>> 

>> > system variables. The server sets these variables whenever the default 

> 

>> 

>> > database changes. If there is no default database, the variables have 

>> 

>> > the same value as the corresponding server-level variables, 

>> 

>> > character_set_server and collation_server.

>> 

>> > "

>> 

>> > 

>> 

>> > Also in the changes of version 4.1.8 in the "Functionality added or 

>> 

>> > changed:" section the first entry reads:

>> 

>> > "

>> 

>> >  * For ALTER DATABASE, the database name now can be omitted to 

> apply

>> 

>> >the change to the default database.

>> 

>> > "

>> 

>> > 

>> 

>> > I searched a while but could not find an explanation.

>> 

>> > 

>> 

>> > So the question remains:

>> 

>> > what is the "default database"?

>> 

>> > 

>> 

>> > Regards,

>> 

>> >Frank.

>> 

>> > 

>> 

>> > 

>> 

>> 

>> 

>> 

-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: What is the "default database"?

2004-12-17 Thread Michael Stassen
Gleb Paharenko wrote:
Hello.

I searched a while but could not find an explanation.
So the question remains:
what is the "default database"?
See:
  http://dev.mysql.com/doc/mysql/en/mysql_select_db.html
While it does explain default database, that page documents a function in 
the Mysql C API.  That seems a strange place to send someone asking about 
character sets and ALTER TABLE, not C programming.  Surely we can find 
better references.  For example:

Set the default: USE dbname
.
What is the default: SELECT DATABASE()

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: What is the "default database"?

2004-12-17 Thread SGreen
I guess that translates (for those users not using the C API) to mean 
whatever database was last "USE"ed ?  So if I say "USE Mydatabase", is 
"Mydatabase" now the default database or does the concept of default 
database only apply to those users using the C API?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Gleb Paharenko <[EMAIL PROTECTED]> wrote on 12/17/2004 07:59:30 
AM:

> Hello.
> 
> 
> 
> > I searched a while but could not find an explanation.
> 
> > So the question remains:
> 
> > what is the "default database"?
> 
> See:
> 
>   http://dev.mysql.com/doc/mysql/en/mysql_select_db.html
> 
> 
> 
> 
> 
> 
> 
> "Dr. Frank Ullrich" <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> 
> > 
> 
> > I came across this term several times while reading about character 
set 
> 
> > and collation handling, e.g. in the last paragraph of the online 
manual 
> 
> > section 10.3.2 
(http://dev.mysql.com/doc/mysql/en/Charset-database.html):
> 
> > "
> 
> > The character set and collation for the default database are available 

> 
> > as the values of the character_set_database and collation_database 
> 
> > system variables. The server sets these variables whenever the default 

> 
> > database changes. If there is no default database, the variables have 
> 
> > the same value as the corresponding server-level variables, 
> 
> > character_set_server and collation_server.
> 
> > "
> 
> > 
> 
> > Also in the changes of version 4.1.8 in the "Functionality added or 
> 
> > changed:" section the first entry reads:
> 
> > "
> 
> >  * For ALTER DATABASE, the database name now can be omitted to 
apply
> 
> >the change to the default database.
> 
> > "
> 
> > 
> 
> > I searched a while but could not find an explanation.
> 
> > 
> 
> > So the question remains:
> 
> > what is the "default database"?
> 
> > 
> 
> > Regards,
> 
> >Frank.
> 
> > 
> 
> > 
> 
> 
> 
> -- 
> For technical support contracts, goto 
https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
><___/   www.mysql.com
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> 


Re: What is the "default database"?

2004-12-17 Thread Michael Stassen
It's the one you're using at that moment.  That is, it's the one you don't 
have to explicitly mention to access its tables.  If you connect with

  mysql [options] db1
or issue a
  USE db1
command, then db1 is the default database.
This is in the manual .
Michael
Dr. Frank Ullrich wrote:
Hi,
I came across this term several times while reading about character set 
and collation handling, e.g. in the last paragraph of the online manual 
section 10.3.2 (http://dev.mysql.com/doc/mysql/en/Charset-database.html):
"
The character set and collation for the default database are available 
as the values of the character_set_database and collation_database 
system variables. The server sets these variables whenever the default 
database changes. If there is no default database, the variables have 
the same value as the corresponding server-level variables, 
character_set_server and collation_server.
"

Also in the changes of version 4.1.8 in the "Functionality added or 
changed:" section the first entry reads:
"
 * For ALTER DATABASE, the database name now can be omitted to apply
   the change to the default database.
"

I searched a while but could not find an explanation.
So the question remains:
what is the "default database"?
Regards,
   Frank.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: What is the "default database"?

2004-12-17 Thread Gleb Paharenko
Hello.



> I searched a while but could not find an explanation.

> So the question remains:

> what is the "default database"?

See:

  http://dev.mysql.com/doc/mysql/en/mysql_select_db.html







"Dr. Frank Ullrich" <[EMAIL PROTECTED]> wrote:

> Hi,

> 

> I came across this term several times while reading about character set 

> and collation handling, e.g. in the last paragraph of the online manual 

> section 10.3.2 (http://dev.mysql.com/doc/mysql/en/Charset-database.html):

> "

> The character set and collation for the default database are available 

> as the values of the character_set_database and collation_database 

> system variables. The server sets these variables whenever the default 

> database changes. If there is no default database, the variables have 

> the same value as the corresponding server-level variables, 

> character_set_server and collation_server.

> "

> 

> Also in the changes of version 4.1.8 in the "Functionality added or 

> changed:" section the first entry reads:

> "

>  * For ALTER DATABASE, the database name now can be omitted to apply

>the change to the default database.

> "

> 

> I searched a while but could not find an explanation.

> 

> So the question remains:

> what is the "default database"?

> 

> Regards,

>Frank.

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]