Jump to content
xisto Community
Sign in to follow this  
OpaQue

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

Recommended Posts

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. 

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



Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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 Xisto 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 Xisto web host and the Xisto SQL server, thus making it local to that connection? Or does this convention apply to connections between the web client computer and the Xisto 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 Xisto SQL server. Am I correct, or am I way off beam?

 

 

Posted Image

 

I cannot seem to connect to the Xisto 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 Xisto hosting account. Yay!!

Edited by travstatesmen (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.