icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old January 29th, 2006, 10:11 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Mar 2005
6 posts
Gave thanks: 0
Thanked 0 times
Can you Setup a mysql DB for a Hostee?

My hostee wishes to just a mysql db and learn how it works but i do not know as of the time how to create a DB for him and him being able to access it without my cPanel Info.
kuroteikuu is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 29th, 2006, 10:47 PM   #2 (permalink)
I'm Dope as Crack
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in Asheboro, NC
Hosted on Pass 7
13,036 posts
Gave thanks: 7
Thanked 29 times
Creating it is easy, but they won't have access to it unless you do one of two things:

1) give them your cpanel info, which is not a good idea and recommended against

2) install another version of phpmyadmin, as previously suggested by Haugland on here in another similar question

As for the creation of the database

http://www.ninehours.com/tutorials/4/

You'll have to consult the documentation for phpmyadmin in order to install it. http://www.phpmyadmin.net/home_page/index.php
__________________
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 29th, 2006, 11:04 PM   #3 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Hosted on Gojira
8,027 posts
Gave thanks: 48
Thanked 129 times
Yes, setting up an additional copy of phpMyAdmin is a relatively simple process. I kind of lost my database with the details in it when I upgrade MySQL on a school server (oops!), so I can't provide them, but if you need help, let me know.

Otherwise, everything to do with the database can be controlled through queries in PHP. Or you can provide IP access to the database and let them use a GUI.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 29th, 2006, 11:30 PM   #4 (permalink)
I'm Dope as Crack
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in Asheboro, NC
Hosted on Pass 7
13,036 posts
Gave thanks: 7
Thanked 29 times
This sounds like something that needs a good easy to understand tutorial written about it. If you have no time to do it in the next few days or so, I have no problem looking into it and trying to write one up.
__________________
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 29th, 2006, 11:45 PM   #5 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Hosted on Gojira
8,027 posts
Gave thanks: 48
Thanked 129 times
It doesn't even really merit the need for a tutorial. From what I remember, it was simply a matter of extracting it to a folder, then editing a few lines in a config file (config.default.php).

Those lines would in fact be:

57; value "localhost"

71; value "http"
72; value is the database user you've assigned
73; value is the password to that user

75; value should be name of database you're letting them use

The rest is essentially fairly standard and shouldn't need to be changed.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 4th, 2006, 2:55 AM   #6 (permalink)
Registered User
Comfy Contributor
 
Z`ohki's Avatar
 
Joined in Aug 2005
Lives in Netherlands
Hosted on Pass48
124 posts
Gave thanks: 0
Thanked 0 times
You can also only change these 2 :

Quote:
$cfg['blowfish_secret'] = 'somethingyouwant'

$cfg['Servers'][$i]['auth_type'] = 'cookie';
That will make phpmyadmin show up a login screen, from there on they can login. Like I have on http://websql.fnae.net
Z`ohki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 4th, 2006, 6:42 PM   #7 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
You can easily set up a mysql db for a hostee, and their own login info for the db without installing phpmyadmin... the only thing is they won't have access to phpmyadmin, but they'll have access to the database

You log into your CPanel, then you go to "Mysql Databases", or directly via
http://www.{yoursite}.com:2082/frontend/x/sql/index.html

You then create the database with the name they ask for. Cpanel will prefix the name of this database so that the real database name is: {cpanel_username}_{database_name}

Then you go down to add users, and create a login for them. To make things simple, use the same login name and p/w as their ftp. Again, the username will be prefixed to: {cpanel_username}_{their_username}.

Then under the lists of databases, there will be a drop down with the usernames, and a drop down with all the databases. You Select their username, select their database, then click Add User to Database

Now they can access a mysql database.

Example:
you own http://www.kuroteikuu.com and your login is kuroteik
you create a mysql database for your subdomain hostee friend.kuroteikuu.com
he wants a generic database so he can install multiple logical databases in his one database (i.e. creating phpbb and wordpress in the same physical database) so he wants the database named universal

You create a database "universal" (which is really kuroteik_universal) and a login "friend" (which is really kuroteik_friend) with his ftp password

You then add kuroteik_friend to the database kuroteik_universal with all privileges (the All privileges checkbox is checked by default)

Then you're done. If he wants to use this database, in his php scripts he connects with the following information:

server: localhost
username: kuroteik_friend
password: {same as FTP}
database: kuroteik_universal

example code for hostee:
PHP Code:
$server 'localhost';
$user 'kuroteik_friend';
$pass ''//whatever their ftp password is
$database_name 'kuroteik_universal';

$conn mysql_connect($server,$user,$password);
$db mysql_select_db($database_name); 
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On