Jump to content

[SOLVED] confusion with names


asmith

Recommended Posts

these names has made me so messed up .

 

when i study php on my computer , i had localhost and mysql been set up ...

 

i had a username and passwords for "entering" mysql ,  then after logging i gave a user privilage for php coding like :

 

mysql_connect("localhost","user","pass");

 

and i had created database with names "user" , "site_info"    IN THE mysql . and so on ...

 

the confussion i have now is  :

 

i've get a hosting package , it has said i can have 3 mysql databases.

 

first question is i can have 3 databases IN mysql database ?  (like my "user" and "site_info" )      OR 

i can have 3 copy of the mysql database (3 mysql softwares?)

 

my site works with cpanel.

in the mysql link , there is "create database" part . i let me create 3 databases, i tried to create more ,but it said i have my 3 databases, now in there i can create users with password and add them to these databases .

 

when i added database "test1"  , it added  "mydomain_test1"  . 

now in all php pages i've write,  for example there are mysql_select_db("test1") , i should change all to mysql_select_db("mydomain_test1")  (assumin i can have 3 databases INSIDE one mysql database ) ...

 

!!!?  !!?  !!?!?!

 

(please talk in my language , like  3 IN  one mysql , or 3 mysql copies . .so i can understand ..    thanks in advance)

 

 

Link to comment
https://forums.phpfreaks.com/topic/86744-solved-confusion-with-names/
Share on other sites

when i added database "test1"  , it added  "mydomain_test1"  .  

now in all php pages i've write,  for example there are mysql_select_db("test1") , i should change all to mysql_select_db("mydomain_test1")   (assumin i can have 3 databases INSIDE one mysql database ) ...

You need to give mysql_select_db() the actual name of your database, i.e. mydomain_test1.

 

first question is i can have 3 databases IN mysql database ?  (like my "user" and "site_info" )

When you've created the database then you can have as many tables as you would like inside that database.

 

(please talk in my language , like  3 IN  one mysql , or 3 mysql copies . .so i can understand ..     thanks in advance)

Seeing as you have a curious way of using punctuation and spacing I don't think that will be possible ;)

thanks for replying  , 

 

the thing i think has made me confused here is  i can have as many databases here on my localhost in mysql database, using :

 

create database example1

 

then in those databases i can have as many tables i want to . 

so in mysql in localhost  can have infinite databases with infinite tables .

 

but now i'm being limited to 3 databases, that was the point ...

 

so , i have to search all the codes and made every "test1" to "mydomian_test1"  ??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.