Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 02-01-2007, 11:16 AM
gobbly2100 gobbly2100 is offline
Hatchling Croc
 
Join Date: Jan 2007
Location: UK
Posts: 16
Question Question About MySQL Connections

Alot of people I know have some kind of problem with reaching a maximum number of connections to MySQL but what I want to know is this:

HG say they allow 30 connections but what is this limited too?

If I am running various databases on my account is it better if I create a seperate MySQL user for each database?
Reply With Quote
  #2  
Old 02-01-2007, 12:48 PM
Impavidus Impavidus is offline
Junior Croc
 
Join Date: Feb 2006
Posts: 155
Default Re: Question About MySQL Connections

The limit is for each mysql user. If create a user for each mysql datebase, each will then a 30 connections limit. Just do not use pconnect.
Reply With Quote
  #3  
Old 02-02-2007, 08:24 PM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Question About MySQL Connections

Hello,
Also do not forget to connect with a simple "mysql_connect" involving timeout and disconnection after work. No persistent connection.
Reply With Quote
  #4  
Old 02-04-2007, 03:32 AM
gobbly2100 gobbly2100 is offline
Hatchling Croc
 
Join Date: Jan 2007
Location: UK
Posts: 16
Default Re: Question About MySQL Connections

What is a simple MySQL_connect?
Reply With Quote
  #5  
Old 02-04-2007, 04:20 AM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Question About MySQL Connections

Hello,
Quote:
Originally Posted by gobbly2100 View Post
What is a simple MySQL_connect?
http://forums.hostgator.com/showthre...=MySQL_connect
See also
http://br.php.net/manual/en/function.mysql-connect.php
Reply With Quote
  #6  
Old 02-04-2007, 07:22 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Question About MySQL Connections

Quote:
Originally Posted by gobbly2100 View Post

If I am running various databases on my account is it better if I create a seperate MySQL user for each database?

Yes, it is better to have different users for each database.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #7  
Old 02-04-2007, 12:21 PM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Question About MySQL Connections

Quote:
Originally Posted by Serra View Post
Yes, it is better to have different users for each database.
I second Serra and it is much more secure.
Also per database it is also recommended to create a minimum of two "Groups", meaning users; one admin with full privileges, maybe one person -> you and an "User" acces with just the privileges they require for to do what they have to do.
So you will have for ex.:
basea_jimadmin ->full privilege
basea_everybody -> whats needed
baseb_ etc

Remember that login in with the domain login/Pwd you have also full privilege but only use this in a domain root connect, not in or under a public_html.

Some e-commerce/PRM are disciminating admin / users, some not.
Reply With Quote
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 02:29 AM.