Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Make SQL Database

Options
  • 08-07-2006 6:31pm
    #1
    Closed Accounts Posts: 386 ✭✭


    Hello there,

    How do I make a database for my website without using Cpanel? I think Im supposed to type sql code into a php file and execute it on my server, is it?

    Ive tried looking on google but couldnt find what Im looking for.

    Thanks.


Comments

  • Registered Users Posts: 3,514 ✭✭✭Rollo Tamasi


    your cpanel will come with phpmyadmin (more than likely anyway)
    go to either yourwebsite.com/phpmyadmin or yourwebsite.com/myadmin and login with a username and password (you need to set this up in cpanel)

    You can install tables via php using code like this:

    [PHP]<?php

    mysql_connect ('localhost', 'db_username', 'db_password') ;
    mysql_select_db ('db_name');

    $sql = "CREATE TABLE test(
    id int(20) NOT NULL auto_increment,
    PRIMARY KEY (id),
    UNIQUE KEY id (id)
    )";

    $result = mysql_query($sql) or print ("Can't create the table 'php_blog' in the database.<br />" . $sql . "<br />" . mysql_error());

    mysql_close();
    ?>[/PHP]

    but you need to setup a database first of all in your control panel. I've never used cpanel though so i wouldn't know where the option to create a new database is. Checkout the Cpanel website for documentation.


  • Closed Accounts Posts: 386 ✭✭That Guy 901


    Thanks man, I think ill get my servers owner to install cpanel.


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Thanks man, I think ill get my servers owner to install cpanel.
    It's not that simple.

    If the server does not have a control panel preinstalled you cannot simply install one, as the control panel software generally will take control of the server in its entirety..

    Which control panel do you have access to?


  • Registered Users Posts: 8,720 ✭✭✭Hal1


    Hey, I experimented with sql a bit and php, my skills in this area are minimal :o. I got them hosted on using e107 on win2003 server and use smf for forums. Its not easy getting started and you will need to do a bit of research too. Alot of trial and error involved btw. :)


  • Registered Users Posts: 3,514 ✭✭✭Rollo Tamasi


    I thought the OP already had CPanel installed and was asking a question in relation to it's usage, i never read the post correctly. My mistake!


  • Advertisement
  • Closed Accounts Posts: 39 Arch-Stanton


    A quick question on Control Panels,

    Does anybody know what Panel Eircom use for their Paid hosting options?

    .


  • Closed Accounts Posts: 382 ✭✭misterq


    I didn't know they had a control panel at all...


Advertisement