Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default How to set up a sql database

    I created a sql database. I have the name that I gave + the username that I use to log to the FTP server, sot the dantabase name is database-name_usernagme. I have a username for this database (the name that I have to use when I log to the FTP server + _username. I also have a password for this user of the database.

    In an other part, I have the server name, the username that I use to connect to the FTP server and the passord.

    Now, to set up the database for a guesbook, I have the fields of those two sections to fill:

    Database ID
    Server (usually : localhost):
    User:
    Password:
    Database name:

    and

    Your ID to access the administration panel
    login:
    Password:
    Type your password again:
    Your Email :

    I tried different ways to give the informaton. It never worked. Could somebody tell me what I have to write at the seven questions (I know for the Email).

    Thanks in advance.
    Last edited by homaquebec; 06-28-2009 at 08:02 AM.

  2. #2
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    If you created the database within cPanel/WHM, then the system automatically adds the account name as a prefix to both the mysql username and database...

    So, if you've named the dbase 'database-name_username' and your cpanel account name is 'cpanel', it's actually called ' cpanel_database-name_username'

    Same thing on user: 'ftpname_username' becomes 'cpanel_ftpname_username'

    Hope that makes sense...

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default How to set up a connection to a sql database?

    Thanks for answering.

    In fact, my question should have been : How to set up a connection to a sql database? This connection is necessary to establish a link between the database an a guestbook.

    So, please, tell me what to write in each field.

    Thanks.

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Quote Originally Posted by homaquebec View Post
    I created a sql database. I have the name that I gave + the username that I use to log to the FTP server, sot the dantabase name is database-name_usernagme. I have a username for this database (the name that I have to use when I log to the FTP server + _username. I also have a password for this user of the database.

    In an other part, I have the server name, the username that I use to connect to the FTP server and the passord.

    Now, to set up the database for a guesbook, I have the fields of those two sections to fill:

    Database ID
    Server (usually : localhost):
    User:
    Password:
    Database name:

    and

    Your ID to access the administration panel
    login:
    Password:
    Type your password again:
    Your Email :

    I tried different ways to give the informaton. It never worked. Could somebody tell me what I have to write at the seven questions (I know for the Email).

    Thanks in advance.

    Your host can provide you the help you seek with this, that's what you pay them for.

    To install a guestbook (a very bad idea these days as it's sure to be spammed so bad you'll get sick of it quickly, IMO) you go to your cPanel, click MySQL Databases icon, at top of page where it says New Database, type in a name for it, lets use guestbook for the name, click create.

    Down near bottom of page, find the section for Add New User, type in a username for it, this really would be better to use something else than your account username, lets use mrsmith for the name, type in a password or generate one from the tool here, then click Create user.

    Down below that where you see the Add User to Database, select the user you created that's listed here, and below that select the Database you created. Click Add, and you're done.

    Now, you have a database, and a user associated with it, you're ready for the guestbook.

    Upload your guestbook files to the location you want it to be in, let's say you want it at yourdomain.com/guestbook.

    Now you need to edit the guestbook config to work with the database.


    Server: localhost
    User: cpanelaccountname_mrsmith
    Password: yourpassword (user mrsmith's password, NOT, your cpaneluserpassword)
    Database name: cpanelaccountname_guestbook

    This last part:

    Your ID to access the administration panel
    login:
    Password:
    Type your password again:
    Your Email :

    I believe is for the administrator of the guestbook. This data is different than everything else. The login is the username you want on the site, could be webmaster for example. Give webmaster a password. And type in an email address where webmaster can receive the emails about all the spam you'll be getting on the guestbook.


    Again, your host is best suited to assist you with this sort of thing. Good luck.
    Last edited by Infopro; 06-28-2009 at 01:31 PM.

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default Very clear explanations

    Thanks for your explanations. I succeeded to install the guestbook.

    Two things had to be changed.

    You wrote:
    Quote Originally Posted by Infopro
    Server: localhost
    User: cpanelaccountname_mrsmith
    Password: yourpassword (user mrsmith's password, NOT, your cpaneluserpassword)
    Database name: cpanelaccountname_guestbook
    cpanel must not be written in front of the accountname; the same thing for the database name. Maybe it is different with an other server or an other guestbook.

    Thanks and have a good week!
    Last edited by homaquebec; 06-29-2009 at 03:51 PM. Reason: I want to add quote tags for Infopro citation

  6. #6
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Well, that was the example to show where the cpanelusername was to be placed. Good to hear you got it sorted all the same.

Similar Threads & Tags
Similar threads

  1. Old SQL database
    By aee156 in forum Database Discussions
    Replies: 2
    Last Post: 07-20-2006, 05:51 AM
  2. Old SQL database
    By aee156 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-20-2006, 05:51 AM
  3. Renaming a SQL Database.
    By moFBush in forum Database Discussions
    Replies: 1
    Last Post: 04-27-2006, 02:30 AM
  4. Renaming a SQL Database.
    By moFBush in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-27-2006, 02:30 AM
  5. Can't create SQL database
    By Charles_cz in forum Database Discussions
    Replies: 10
    Last Post: 04-22-2005, 03:34 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube