469,603 Members | 2,049 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

How do you create a database with a dash in the name?

I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil
Jul 19 '05 #1
14 15596
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


More information needed:

What database server are you using? (Assuming MySQL but you never know...)

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #2
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #3
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


More information needed:

What database server are you using? (Assuming MySQL but you never know...)

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #4
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #5
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #6
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #7
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #8
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #9

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #10

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #11

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #12
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #13
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #14
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Robert | last post: by
5 posts views Thread by Phil Powell | last post: by
1 post views Thread by el_roachmeister | last post: by
reply views Thread by Darin Browne | last post: by
1 post views Thread by mats.broberg | last post: by
reply views Thread by =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.