Tuesday, October 18, 2011

How to Create a Mysql Database to Install a Php Script

Many php scripts available for download require that a mysql database be created so that data can be stored for use with the script itself. this may seem like a daunting task for a beginner. But don’t worry, the only difficult part about it is not knowing what to do and that’s what we’re here to teach you.

It’s assumed that you already have a web host and access to hosting administration like cPanel, Plesk, etc. We’ll be using cPanel for the purposes of this lesson as it’s commonly installed on Linux servers. However, most major hosting control panels have the same basic principles which can be applied here.

Log in and Create the Database

The first step is to log into cPanel as the user for the domain that your script will be hosted with. this is accomplished by going to domain.com/cpanel in your browser and replacing domain.com with your domain name. you then enter your hosting username and password given to you by your hosting company.

Once you are logged in scroll down the page to Databases and click the MYSQL Database Wizard icon. this is where we create the actual database. Enter your database name in the new Database: field and click Next Step.

If you plan on having more than one database the name should be descriptive to help keep everything organized. for example, for a database used for ecommerce you might name it ecomm. CPanel will add a prefix of your main hosting username and password so your final database name may end up looking like this: username_ecomm.

Add A MYSQL User

Next, we need to add a user that can access and modify the database. Enter the username you wish to use for the database and create or generate a password with the Generate Password function. Be sure your password is a combination of letters, numbers, and symbols to make it as secure as possible. your username will appear similar to the database name as the hosting username prefix will be added to it as well. for example, username_dbuser. Once these values are entered click Next Step to continue.

Give the User Privileges

Now we give the user privileges so that they may actually work with the database. usually, you will select the All Privileges box and this is satisfactory for most script installations. If you don’t want the user to be able to modify the database but would still like them to be able to access the records you would select the Select box and so on. Click the Next Step button to finish.

Congratulations

You’ve just created a database and a user that you can now use with your Php scripts. many of these scripts have a configure file that contains settings with default values for database name and users. you simply open this file with your favorite text editor, like notepad, and change the default values to what you just created. this enables them to install the tables needed to run the script itself.

read interesting immigration news opinions

No comments:

Post a Comment

Illegal Alien News CNN

Immigration News Daily

Blog Archive