DB name problem

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
Hello.

I'm new to mysql !

On my computer, I've create a database with the 2 parts name "ayant_droit", but, when I want to create it on cPanel, it refuses the "_", and it seems to add my Ident as a prefix : "ident_dbname", and here with the "_"

How can I create the name I want ? :nuts:

Thanks for your responses.
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
To minimise conflicts with other DB's, X1- does include the username prefix - there's nothing you can do about this.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
You're on a free service where thousands of accounts are using the same sql database server; to prevent database name collisions (such as two users using the database name "smf" or "phpbb"), cpanel prefixes everything with your login name.

Not entirely sure why it's not allowing a name with an underscore in it, but there's not much that can be done with that - you're gunna have to make do with the limitations in place, or end up finding another way to store data.


If you dun mind me asking, why does it matter if it's cpanellogin_ayantdroit and not cpanellogin_ayant_droit? The only person whose going to be seeing the database name is you anyways, and once the database is made, the tables inside that database can be named whatever you want.
 

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
Thanks for your answers.

I think in my programs, it'll be better if the db name is in a variable !

I gonna modify that.

thanks again ;)
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
I think in my programs, it'll be better if the db name is in a variable !

Whoa... I think you lost me, could you explain that last statement please?
 

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
Whoa... I think you lost me, could you explain that last statement please?

Hello

I'll write something as : "$db = 'mydbname'" and then use this variable (i.e. $db) in the entire script. and so, if one of these days, I've to change the db name, there will only one place to change it in the script. That is, for exemple, my script was first written on my computer, and there was no prefix and an underscore in the dbname, and I've to change it in several place...

thanks.
 
Top