Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Sep 2003
    Location
    Scotland
    Posts
    8
    Member #
    3280
    I am so lost at the moment. I have been told to find out the name of my MySql database and like i cant remember making one lol. Is their any chance some1 could post and tell me how 2 make a database and/or how 2 find the name of them. Sorry about this

  2.  

  3. #2
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    I made a new thread, because this was posted in the "100 Do's and Don'ts" thread that is stickyed. That's a "don't" Gillespie. In the future, post new questions in new threads.

  4. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    New York
    Posts
    13
    Member #
    3580
    How to make a database: .. well that one is a bit to long for a single post

    How to find the name of your database: There are a few ways to do that.

    1st would be to ask your hosting provider. If you provider uses an online control panel such as plesk, cpanel, ensim, then they usually offer a tool called phpMyAdmin. This will let you view, create,modify, and populate your database.

    2. If you have "shell access" you can use the mysqlshow command. If you have a password you will need it. here is an exaple of the output on a server i have a database on:
    Code:
    bash-2.05a$ mysqlshow -ppasswd
    +----------------------------------------+
    |               Databases                |
    +----------------------------------------+
    | 23na_com_-_syncit                      |
    | 318ti_org_-_forum                      |
    | 380online_com_-_380online              |
    | admin_appl                             |
    | alatseldi_com_-_banthamart             |
    | allwebtools_com_-_1                    |
    | allwebtools_com_-_2                    |
    | allwebtools_com_-_3                    |
    | allwebtools_com_-_4                    |
    | allwebtools_com_-_5                    |
    | allwebtools_com_-_6                    |
    | allwebtools_com_-_7                    |
    | allwebtools_com_-_8                    |
    | articulatesupport_com_-_deskpro        |
    there are a few problems with this though. as you can see it is listing everyones database names! This problem is fixed in Mysql Server 4, but for now you will have to look through the list.

    The password: If you have a password use the -p flag (WITH NO SPACE) like i did above.. The password in my case was passwd.
    If you do not have a database, depending on the server configuration, you will probobly get a password error.

    3. Im sure there is some way to do this php as well, but this is what im used to.

    ____________________
    ViewTopia Web Hosting
    Coming Soon!
    ViewTopia Web Hosting
    Coming Soon!

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    If the server you're hosted on has either Ensim, CPanel or MySQL Admin isntalled you should be able to find it no problem. I'd log into the control part of your site to see what it's called.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Originally posted by ViewTopia
    How to make a database: .. well that one is a bit to long for a single post
    LOL, just to be the prick that I am... making a new database is a bit different for each type of DB server, but for MySQL, it's like this:
    Code:
    CREATE DATABASE database_name;
    Not to long for a single post, I reckon. ;-)

  7. #6
    Junior Member
    Join Date
    Oct 2003
    Location
    New York
    Posts
    13
    Member #
    3580
    oh fine. why not.. here is an example of a MySQL database. Of course you can make the fields what ever you want.

    This is what it looks like
    Code:
    +--------------+----------+------+-----+---------+-------+---------------------------------+
    | Field        | Type     | Null | Key | Default | Extra | Privileges                      |
    +--------------+----------+------+-----+---------+-------+---------------------------------+
    | AcctNum      | char(8)  |      | PRI |         |       | select,insert,update,references |
    | CompanyName  | char(50) | YES  |     |         |       | select,insert,update,references |
    | ContactName  | char(50) | YES  |     |         |       | select,insert,update,references |
    | Addr1        | char(40) | YES  |     |         |       | select,insert,update,references |
    | Addr2        | char(40) | YES  |     |         |       | select,insert,update,references |
    | City         | char(30) | YES  |     |         |       | select,insert,update,references |
    | State        | char(2)  | YES  |     |         |       | select,insert,update,references |
    | Zip          | char(10) | YES  |     |         |       | select,insert,update,references |
    | ContactPhone | char(15) | YES  |     |         |       | select,insert,update,references |
    | Fax          | char(15) | YES  |     |         |       | select,insert,update,references |
    | ContactEmail | char(50) | YES  |     |         |       | select,insert,update,references |
    +--------------+----------+------+-----+---------+-------+---------------------------------+
    And this is the SQL for it. To populate the database you need to use the INSERT statement. I gave an example of one at the bottom.
    Code:
    --
    -- Table structure for table 'customers'
    --
    
    CREATE TABLE customers (
      AcctNum char(8) NOT NULL default '',
      CompanyName char(50) default NULL,
      ContactName char(50) default NULL,
      Addr1 char(40) default NULL,
      Addr2 char(40) default NULL,
      City char(30) default NULL,
      State char(2) default NULL,
      Zip char(10) default NULL,
      ContactPhone char(15) default NULL,
      Fax char(15) default NULL,
      ContactEmail char(50) default NULL,
      PRIMARY KEY  (AcctNum)
    ) TYPE=MyISAM;
    
    INSERT INTO customers VALUES ('1','ViewTopia','Dan Casey','PO Box 264',NULL,'Mohegan Lake',
    'NY','10547',NULL,NULL,"viewtopia@docwebhosting.com");
    the entire manual can be found at www.mysql.com
    ____________________
    ViewTopia Web Hosting
    Coming Soon!
    ViewTopia Web Hosting
    Coming Soon!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:50 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com