|
Posted by MS on 06/09/05 15:15
> OK - that helps get a perspective. And yes, you are missing something: it
> has to do with the manner in which you are setting up your database.
AAAAhhhhhhhhh I can hear the pennies dropping :-)
>
> When you install a MySQL server, you initially install a user named
"root".
> That user initially has full privileges, including the ability to create
> other users. Generally, that account is used by the database
> administrator(s) to set up individual user accounts.
>
> When you create a MySQL database in CPanel, Cpanel is accessing the server
> with an existing user account that has the privileges to be able to create
> other users. That account was most likely set up by the system admin when
> you signed up for the hosting service. If you had that userID and
password,
> you could probably use it to access the database, as well as the user you
> created along with the database.
>
> The ultimate point being: you HAVE to have a userID and password already,
> even to create other userIDs. The only exception to this (that I'm aware
of,
> at least) is during the initial setup of MySQL, when you have to define
the
> 'root' user.
>
> The practical end of all this is that anyone who would be installing your
> program would already have a userID & password for MySQL.
>
> The biggest potential problem you face is that their userID would not have
> privileges to create a database, in which case the attempt to create the
> database would fail. You would have to provide some checking for that, and
> offer instructions on what to do in that case (which would be to create
the
> database manually).
>
> Another potential problem you face is that the database has already been
> created by the user before running your setup script. Again, you would
have
> to do some checking for that, and if the database exists, you would skip
the
> database creation process and move along to the table creation &
population.
> I would recommend a failsafe check confirming that the user really wants
to
> do this, however, on the odd chance that they may already have a database
> with the same name in use.
>
> Given what you are trying to accomplish, I would strongly recommend
getting
> a better grounding in MySQL. I don't know of any web tutorials online
other
> than the official stuff at the MySQL website, but I'm sure there are
> plenty - try www.w3schools.com for starters. Also, I have found the book
> "PHP 5 / MySQL Programming for the Absolute Beginner" to be a really good
> start - and since it includes instructions to install a MySQL server, it
> should help you learn your way around from the ground up.
>
> Hope that's some help -
The Pennies are in place now. I understand what i was missing and that
helps a lot, I am not sure what my next move will be on this process but
slotting those pennies in is a great help.
I just wanna thank you for your time and trouble on this matter, I am at the
start of my education and have a lot to learn, and you have helped greatly.
Thanks Tony
Alex
Navigation:
[Reply to this message]
|