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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Make SQL Database

  • 08-07-2006 5: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, Registered Users 2 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, Registered Users 2 Posts: 7,740 ✭✭✭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, Registered Users 2 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, Registered Users 2 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