Nov 20, 2009

Mysql Database Setup : Setting Up Mysql Database - Guide to use MySQL database in your site

free web hosting
Open Discussion > MODERATED AREA > Trapper's Secret HideOut

Mysql Database Setup : Setting Up Mysql Database - Guide to use MySQL database in your site

OpaQue
A SMALL INTRODUCTION TO DATABASE
=============================

I have seen that many members have problems with Database.

Here is a small INFO which should give you the IDEA.

mySQL is a DATABASE server. You can access it using the [MySQL Database] link in Cpanel. Cpanel can be accessed by "www.YOUR-SITE.com/Cpanel"

There you have 4 Main Options :-

1> CREATE A DATABASE
2> CREATE A USER
3> ADD USER TO DATABASE
4> PHPMYADMIN

CREATE : IT ALLOWS YOU TO CREATE A DATABASE

CREATE USER : IT ALLOWS YOU TO CREATE A USER. USING THIS, YOU CAN ACCESS THE DATABASE. A DATABASE CANNOT BE ACCESSED BY ANYONE. AND ONLY THE USERS WHICH YOU SPECIFY CAN ACCESS IT.
SO AFTER YOU CREATE A DATABASE, YOUR NEXT STEP SHOULD BE TO CREATE A USER AND ADD HIM TO THAT DATABASE ( BY GIVING PERMISSIONS )

ADD USER TO DATABASE : THIS WILL ALLOW YOU TO ADD OR PERMIT YOUR CREATED USER TO A PARTICULAR DATABASE.

PHPMYADMIN : A graphical Tool for managing your Created Database

====== STEPS FOR ACCESSING THE DATABASE ======

Create a DATABASE. The names are automatically prefixed by the name of your user account. You will have to access the database hence forth by using that prefixed name. It is done for security reasons. Suppose you create a database "register" then and your username is "abc", then the database created would be "abc_register".

NEXT, Create a USER. ( This user is not your Cpanel username. It is a diffrent one for accessing your database. You are supposed to create this account)

The usernames are also automatically prefixed. So creating a user "tom", creates a user like "abc_tom" where abc is your Cpanel username, you must also specify a password. This will be used for accessing the database using this particular user. Suppose you give the password "timmy". [ PASSWORDS ARE NOT PREFIXED!!! ]

Then you are supposed to give permissions to this USER to access the database.
Go to the respective option and select the USER and the DATABASE and click ADD USER. Most of the times, you will give "ALL" permissions to that user.

Now, when using PHP SCRIPTs, when it prompts for DATABASE Settings, these will be your settings (for above procedure )

[ DATABASE SERVER is the location and it will always be LOCALHOST ]

1 > DATABASE SERVER : localhost
2> Database Name : abc_register
3> Database User : abc_tom
4> Database Password : timmy

SETTINGS LIKE DATABASE PORT are all DEFAULT. So Leave those fields BLANK. The REST all the settings can be anything ( your choice ).

+=========== DATABASE ERRORS ===================
+
+ ONLY THE FOLLOWING ERRORS SHOW THAT THE PROBLEM IS FROM THE SERVER! + THE REST ALL ERRORS ARE DUE TO YOUR OWN MISCONFIGURATION.
+
+============================================

Too many Connection : This means that server is being killed by many people accessing it and you will have to wait before the load decreases. This message is usually because of someone else abusing the server. The Servers are very powerful and it is only the ABUSE by some members, the entire service is affected.

Warning: MySQL Connection Failed: Can't connect
to local MySQL server through socket '/var/lib/mysql/mysql.sock
THIS IS also caused when someone abuses the server. This error has to be handled by our TECHS.

+=============================================
+ DATABASE LOST, DELETED, REMOVED!!
+=============================================

PLEASE KEEP THIS INFORMATION AT THE BACK OF YOUR HEAD.
WE DO **NOT** DELETE ANY DATA.

The Cpanel Will not SHOW your DATABASE if :-
1> The SQL server has been shutdown.
2> SQL server is undergoing upgrades or any other maintananace tasks
3> The SQL server is halted or freezed due to any other reason or abuse.

THIS DOES NOT MEAN that your DATA is GONE. As soon as the Database Server is bought up online, Your database will appear again. Dont take foolish steps or get alarmed by this. Stay cool and calm.

+=============================================
+ WHAT ARE THE REASONS FOR ERRORs!
+=============================================

The main reasons are Noobs who try to execute Faulty scripts. Or Rivals who try to execute Dangerous scripts on purpose.

We have given you a commitment for Quality. It is because of this, We cannot :-
1> Put restrictions on PHP, Perl...
2> We cannot activate safe modes
3> We cannot impose shorter timeouts
4> We cannot Block access to critical controls.
5> We cannot limit your per user CPU usage.
and many more...

If we do this, you will no doubt enjoy a better service, but then there will be no diffrence between the rest and us. You as a talented member chose us because we give you the opportunity to show it and give you all the necesary tools you require.

The Server RESOURCES ARE SHARED! So it is better we use and share it peacefully.
Any member, who affects the server or cause HARM is immediately TERMINATED!

+=============================================

Regards,
OpaQue

 

 

 


Comment/Reply (w/o sign-up)

Xedos
Nice one QpaQue. This should solve alot of querys, then again, all the new members will still do the same. Coming in, not reading the pinned topics. I hate those people! I'm gunna start reducing reputation points for asking questions answered in pinned topics.

Anyway: this has also solved some of my querys I have been meaning to ask you. Thanks for this short document.

Comment/Reply (w/o sign-up)

owbussey
Is it true that you can have as many mysql databases on this site?

Comment/Reply (w/o sign-up)

serverph
QUOTE(owbussey @ Oct 9 2006, 06:27 AM) *

Is it true that you can have as many mysql databases on this site?


how many do you need? biggrin.gif since you are already hosted with trap17, check your cpanel for the number of mysql databases allowed for your account. smile.gif it it says "unlimited", then that basically answers your question. biggrin.gif

Comment/Reply (w/o sign-up)

matak
Since this is a topic about MySQL i just might this question here.

I have installed joomla and wordpress and phpb and drupal...

Can I make some script or something so that every user that registers on joomla is also registered on other CMS-s--

Well it's way OT, but since lot's of users might check this topic i guessed it's better to ask here than to write new topic..

Comment/Reply (w/o sign-up)

innosia
Can we set different rights for different user?

Comment/Reply (w/o sign-up)

travstatesmen
Here is a bit of a dilemma. I note that OpaQue mentions that "DATABASE SERVER is the location and it will always be LOCALHOST". But, tell me, what happens in the situation where I am accessing the SQL server on Trap17 using a client that has its own localhost SQL server, such as an installation of XAMPP on it? Does the information above only apply to connections between the Trap17 web host and the Trap17 SQL server, thus making it local to that connection? Or does this convention apply to connections between the web client computer and the Trap17 SQL server? If it is the latter then using the setting DATABASE SERVER: localhost would only confuse matters, wouldn't it? Because the client would be seeking the SQL server called localhost, and would find its own XAMPP installation instead of the Trap17 SQL server. Am I correct, or am I way off beam?




I cannot seem to connect to the Trap17 SQL server for my account, and I wonder if this is the reason why. Every time I try to connect I get a "403 Not Authorized" error. Once again, please be patient with me as I freely admit to being a n00b. Thanks.

EDIT: Disregard this please. I found out what the problem was, with a bit of help from shadowx. It seems that my CHMOD settings were not being automatically inherited by subfolders, so I am now using using FileZilla FTP Client instead of CoreFTP. All better now, and my Lanius CMS package is installed and working nicely on the SQL server on my Trap17 hosting account. Yay!!

 

 

 


Comment/Reply (w/o sign-up)

Xalor
Thanks for the info. I used to have this problem when I started my own site, that didn't have Fantastico, had to make my own scripts. Guys make sure though that you give all permissions, otherwise the user is next to useless. They can't do much and it defeats the point of having a main user. Usually give total privileges to all the users, but for others give them the ones that they need so they can't mess with the other information you have on there. I hope this does help someone else like it has helped me on my other host.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Mysql Database Setup Setting Mysql Database Mysql Database Site

  1. I Can't Access My Site - (7)
  2. 403 Forbidden Error When Accessing My Site - (12)
    umm this is a problem that i have been looking in other topics to try to fix but i can't seem to
    find a answer to what i lookin for. I got my site workin again the other day ok and so i went on to
    see it (so i can make more changes) and when i got there i got this QUOTE Forbidden You
    don't have permission to access / on this server. Additionally, a 403 Forbidden error was
    encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at
    www.clansga.trap17.com Port 80 now i looked at everything and i can't seem to find t...
  3. School Blocks Out My Site. - (19)
    deleted...
  4. Setting Up A Remote Mysql Connection - Need help! (3)
    Okay... I'm hosted here on Trap17. I would like to connect to a remote MySQL database located on
    another server... can someone walk me through what I need to do to set this up, or if it can even be
    done? Thank you in advance!...
  5. Site Taking Too Long To Respond - Message from Firefox (13)
    "Site Taking Too Long To Respond" issue has been resolved and It is caused when the service Apache
    on server is not responding to your queries due to reboot / maintenance. To solve this, Contact Web
    Hosting Support @ http://www.xistosupport.com/billing/ At ComputingHost, this issue should not
    persist more than 2-5 min. 1. ComputingHost (web host sponsoring this site) uses Advanced ROUND
    ROBIN DNS (managed DNS solution) 2. Network is Powered by XO Communications and they employ Branded
    Server Hardware for tension free uptime! Package Details ComputingHost: Logic XTREM...
  6. Restore Database Have Bug ? - I restore and have errors ! (4)
    I tried restore a database as type : username_forumname.sql ! After restore , check in cpanel ,
    feature mysql datase , I seen a new database is : username_usernameforumnamesql ! Have anything
    wrong ?...
  7. MYSQL Settings - (5)
    I am going to edit my mysql settings. Before i had freesql.org but that's slow. So now i
    created one here. What is the host? What must i put in the server....
  8. Transferring Files From One Host To Another - Take my site to trap17 (9)
    As I said, I had to move my web site away from Trap17 temporarily because I had ran out of disk
    space. Now, when my upgrade is finalised, I would like to ask for a little assistance. The provider
    I will be moving my site from, back to Trap17 also uses Cpanel, and the admin let me know to do a
    backup and that backup could be simply transferred via FTP to my new provider. The backup includes
    all my files and MySQL data, in other words, the whole web site. It is in a .tar.gz format. How do I
    get all this across? Do I 'unzip' the file and then transfer them bit by bi...
  9. How To Add Files To My Sql Database - (3)
    Hey im trying to add a file to my My SQL Database, Any idea how I can do this? Any help would be
    appriciated. Thanks!...
  10. Mccodes With Mysql! [resolved] - I need help with this topic (6)
    Hey all, I was trying to install my McCodes game I bought recently, but every time I try to install
    it, I get this error: QUOTE Write Config... Config written. Attempting DB connection
    Warning : require(class/class_db_mysql.php) : failed to open stream: No such file or directory in
    /home/lwadmin/public_html/installer.php on line 457 Warning :
    require(class/class_db_mysql.php) : failed to open stream: No such file or directory in
    /home/lwadmin/public_html/installer.php on line 457 Fatal error : require() : Failed
    opening required 'class...
  11. Mysql Server Down - (10)
    mysql (5.0.51a-community) failed What is happening? And btw, sometimes I get a message: could not
    connect with mysql server. I use joomla 1.5 . but now, the server is down as shown on Server
    status... please help...
  12. Cannot Open My Site - (12)
    Hi everyone. Sometimes, I cannot connect with my site, neither ftp, ping, etc. This happens
    everyday, and sometimes, as a miracle, doesn't happen. This also happens with a friend of mine
    with the same ISP. I contacted my ISP, and they told me that there must be a prob with the server,
    not the ISP itself. Do you have any ideas? Thanks in advance, Alex btw, proxy browsing sucks!
    /blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" />...
  13. Help Moving Mysql Files To A New Host - IPB files (2)
    Well, my partners on my forum has decided to move our site to a newer host. A paid one to be exact.
    And we did that already. Now all we need to do is move our forum over to the new host. We want to
    do this without losing all of our posts and other data. I know it has something to do with the MySQL
    files but I don't really understand it. Some help would be appreciated. We are running Invision
    Power Board 1.3.1 final Also, we're thinking about upgrading our board to a newer version of
    IPB because we heard that its better in more ways than one. But then again, it...
  14. My Site Is Down :( - (11)
    QUOTE http://frover.trap17.com/qyfyre.com it has been down since yesterday /sad.gif"
    style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />...
  15. My Site Is Crippled. - I can't access anything (10)
    Hey guys please help. I haven't been able to access my cPanel for a long time now. I think the
    problem started when most members had those password problems. I think that's when I made too
    many unsuccessful login attempts. Now I can't access my cPanel and any site hosted here. Someone
    told me my IP is blocked but I don't know who to tell to have the problem resolved.
    BuffaloHelp(sorry if it wasn't u Buff) stated in one post that he could reset password if nayone
    would write a post with the line "Please reset my password". I did that but still there is...
  16. I Can't Seem To Access My Site. - (8)
    I try to go to my hosted site http://saitunes.trap17.com and it just thinks, then it says the
    operation timed out. Can anyone else access my site?...
  17. Can't Access My Site An Cpanel - already did some sugested things (6)
    I still can't get to my website and cpanel, Tings I did: requested xisto to unblock my ip
    cleaned my cache/cookies Did this with both IE and FF When I am @ my dads house he can acces my
    website. So I guess it is still an ip problem. I did read some posts but couldn't find a
    solution. Thx in advance,...
  18. Mysql Database Not Working - (3)
    well i'm getting an error message(a databass connection warning) for all of the parts of my site
    that connects to a mysql database i check my database users pertmissions and i try to do the repair
    database thing and it's still not woeking. am i the only person having this or is it an overall
    trap17 issue and how do i fix it....
  19. Ips Installer Database Details [resolved] - It wont accept localhost... (6)
    CODE Access denied for user 'skyed211_central'@'localhost' to database
    'skyed211_centralgaming' I get this error message when trying to install my IPB. It will
    not accept localhost, nor mysql. Can I get any help please? I've tried many times to get past
    this part, but it's not happening /sad.gif" style="vertical-align:middle" emoid=":(" border="0"
    alt="sad.gif" />...
  20. Phpmyadmin - Create new database: No Privileges (7)
    i can not make a sql for diff srcipt, but the sricpt i have is php, DJ-cpanel.. all tho i can not
    install it the error is like this Creating Database Tables No database selected there a mysql
    database is made, but i can not use it for othere stuff... plz note that this is Free script and not
    for paid.. is there a way that the myqsul can not use sql other scripts? or it maybe not working...
    but i am not sure if the script not working or it can be the server may be down on mysql...? ...
  21. Wallpaper Site - (4)
    Hello I hope this is the right place for this thread . I want to thank to Trap17 for their
    wonderful hosting service and because I have no problems related to hosting . I have a wallpaper
    site based on 4images gallery system . But my images have high resoultions (1600*1200 ) and when
    someone enters a wallpaper page , 4images displays the full size image and that too big for a page
    . Is there any way to display a small image in the wallpaper page and a big image when someone
    clicks download ? Or could you recommend me a better software ? Thanks in advance ....
  22. Hosting Problem [resolved] - 403 Forbidden Error occurs whenever I try to access my site (22)
    First off, let me say that I have spent considerable effort and time going through the forums
    seeking solutions for this problem. I have even gone as far as to seek help from the Xisto Live
    support team (they suggested I wait 2 hours and then get back to them. Well I did that, and there
    has been no change, and live support is now down). I've also tried changing permissions on both
    files and folders via Cpanel, but to no avail. I still end up with the same error: QUOTE
    Forbidden You don't have permission to access /index.php on this server. Additionally, a 4...
  23. It Went Well For A While - MySQL problem back in all its glory. (5)
    Some time ago I had a stubborn problem when trying to access one of the interactive pages on my
    website and getting the following error: QUOTE Warning: fopen() : open_basedir restriction in
    effect. File(include/errors.xml) is not within the allowed path(s):
    (/home/mrdee:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Warning:
    fopen(include/errors.xml) : failed to open stream: Operation not permitted in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Cannot open XML data file:
    incl...
  24. Is The Database System Gone Again? [resolved] - Errors on PHPMyAdmin again (12)
    I wonder if there is a problem with the PHPMyAdmin system again? When trying to get into it, I once
    again get the following: QUOTE Warning: session_write_close() : SQLite: session write query
    failed: database is full in /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 42
    Warning: session_write_close() : Failed to write session data (sqlite). Please verify that the
    current setting of session.save_path is correct
    (/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in
    /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 42 Warning: Ca...
  25. No Site Access - (4)
    It was working the day before yesterday and then it started giving me error messages about not being
    able to access the site. I can't access cpanel either. Neither page ever loads. I don't
    have this problem with any other internet pages, just my site stuff on Trap17. My site's at
    www.jzambrano.trap17.com btw. This is one of the few times I'll need it up for sure so I'd
    appreciate if the issue can get fixed in the near future. ...
  26. Can't Login To Any Software On My Site - anyone know how to fix? (3)
    In a subdomain of my site I have an installation of MediaWiki, and until now it's been working
    fine. But today I've been having trouble with it. Previously, whenever I logged into MediaWiki
    it worked first time and I would stay logged in for about an hour, even without the "Remember Me"
    option checked. But I tried logging in now, and after logging me in, the next page I went to showed
    me as "not logged in". I cleared the cache as I know this has been a problem before, and then tried
    logging in again, but it still said I was not logged in! So I tried one more time...
  27. I Need Help With Setting Up My Site, Made Using Java - any help would be appreciated (5)
    I just got web hosting approved and I want to host the site I created using Struts framework.
    I'm a complete newb when it comes to web hosting, so I need a little help. Is there a tutorial
    that covers this subject? I apologize in advance if this question was already answered, but
    I've been unable to find the answer anywhere. One thing I have to note is that I need to know
    absolute address of the uploaded files in order for my application to work. Is this even allowed?
    Any help with hosting of Java applications will be appreciated....
  28. Can't Access My Site....weird Issue - (5)
    Okay, so last night everything worked fine. I loaded up cpanel, fixed issues with the site after the
    database move, etc. Today I'm unable to load up the site. It just keeps giving me ping
    timeouts. With what I'm being told by others it is only me having this issue with my site, and
    yet there have been 0 changes to my pc between it working and not. I have tried multiple times
    during the day with no luck. Along with this, if I load my website using a proxy service then I do
    not have any issues. The only time it will not allow me to access it is if I am "using" my...
  29. How Do I Find My Mysql Password? [resolved] - Cannot access my MySQL (5)
    After all the recent problems, my account has been restored. I have setup my parked domain agin, and
    that works fine. However, I can no longer access my MySQL databases (I can from PHPMyAdmin, but
    that's all). I had to create a new user for my databases, and created the user with exactly the
    same username and password I had before, but some of my web pages do not let me access the pages I
    have associated with my databases. Where could i find out what my DB password is? (Although I am as
    good as sure I am using the right one). I have tried my old password, the new c...
  30. Remote Access Mysql - (8)
    Is it possible to directly access my local database from my website? For example, if somebody
    submits info on my website, the info they submitted would be transferred to my local database
    directly. Is that possible? And if so, how do I set that up? The reason I don't want to upload
    my database to my subdomain is because it would be difficult to keep the website database and my
    local database in sync . . . or is there a way to do that? Thanks for any replies....



Looking for mysql, database, setup, setting, mysql, database, guide, mysql, database, site

Searching Video's for mysql, database, setup, setting, mysql, database, guide, mysql, database, site
See Also,
advertisement


Mysql Database Setup : Setting Up Mysql Database - Guide to use MySQL database in your site

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com