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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: MySql Commands

  1. #1
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    I have installed PHP, Apache and recently wound my way through installing MySql (i hate it now but there you go).

    I have gone into MySql and I wish to make a database. The project i am working on is a guestbook, i was wondering how to crate databases, tables and whatever else i need to complete my project.

    I hope somebody can help.

    tekp

    PS - if somebody can i think they get $5, but this is the first posti have done so i dunno...
    tekp :cheeky: tekponline.com

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    You should get a GUI (graphical user interface) to work with your database.
    phpMyAdmin or MySQLControlCenter are the most popular (both can be downloaded for free).

    You can write the following in the commandline prompt:
    Code:
    CREATE DATABASE mydatabase;
    The syntax is case insensitive, but the mysql commands are written in uppercase here to show you what is syntax and what is names.

    After you have created the database, you select the database by typing "USE mydatabase;"

    After the database is selected, you type:
    Code:
    CREATE TABLE `guestbook` (
    `id` TINYINT( 4 ) NOT NULL AUTO_INCREMENT ,
    `name` CHAR( 40 ) NOT NULL ,
    `email` CHAR( 30 ) ,
    `time` TIMESTAMP NOT NULL ,
    `text` TEXT NOT NULL ,
    PRIMARY KEY ( `id` ) 
    );
    That will create your first table to hold guestbook entries. You can have multiple tables in one database. You don't have to create a new database every time you create a new table. You should, however, try to group tables that relate to each other, in the same database.

    I don't have time to elaborate now, got a plane to catch.
    Best of luck :classic:
    S. Rosland

  4. #3
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    So what does a GUI do? Is it just like a friendlier looking way to make databases?

    tekp
    tekp :cheeky: tekponline.com

  5. #4
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    I have downloaded phpMyAdmin but i cant find an install or setup program. What do i do?

    tekp
    tekp :cheeky: tekponline.com

  6. #5
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,656
    Member #
    1234
    Liked
    137 times
    GUI = Graphic User Interface

    For phpMyAdmin, you have to FTP it to your web space. There should be a read me file included with it that will give you specific instructions.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  7. #6
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    I have given up on phpMyAdmin now and have successfully downloaded and installed MySQL Control Center.

    But I am stuck again (sorry) on how do i actually make databases and how do i upload them with this program.

    thanks a lot fro your help, you're all really helping ^_^

    tekp
    tekp :cheeky: tekponline.com

  8. #7
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Hi again.

    (I like to follow up up on posts I make, but just for information I will be unaccessable for the next 5 days. I'm right now at a place I can access Internet, but in an hour or so I'm effectively cut off.)

    Then to your question.
    MySQL CC is more "userfriendly" with its MS-Windows-like GUI, but phpMyAdmin is more powerful. Once you get to know the latter, its quite easy to use. Takes a day or two to get familiar with the interface.
    If you don't know diddely squat about SQL syntax, it might take a bit longer. The install is very easy, the only things you need to edit are the host/user/password variables. Explained in detail in the "install.txt" file.
    (A really powerful editor is MySQL manager. That's on the other hand a fairly expensive commercial product. Had a trial version for 30 days, and got really impressed)

    MySQL can be installed on a local machine and also access databases on a remote machine. PhpMyAdmin is normally uploaded to the server where the database system resides. It might be possible to access a remote server from phpMyAdmin, but I haven't had any incitament to figure it out, as it's quite easy to install on the server you use.

    With regard to using MySQLCC, it's quite easy. You just use the file menus to add connnections/databases/tables/permissions etc.
    If you rightclick a database or a table, you get a menu with options for edit and other things you might wanna do.

    I have no working copy of either one in front of me (where I am now) so I can't describe to you what to click and where to find it (as I don't remember the whole menu structure by heart). It should, however, be quite intuitive.

    If you know absolutely NADA(!!) about SQL in general and MySQL in particular, I strongly reccomend to by a book for beginners, just to get up to a level where you comprehend whats going on. All the worlds GUI tools are not going to help you, if you don't have a clue about table structures and queries.

    (Buying a state-of-the-art car-integrated GPS navigation system woun't guarantee the stoneage man safe navigation through suburbian Paris, as he doesn't have any conceptional understanding of what a "car" is.)

    (The latter not meant as an insult, but as
    an illustration of my point :cheeky

    With regard to "how to install" "how do I accomplish this and that", there are lots of threads in this forum covering many of these topics. Do a search and see what you can find. If nothing fits, I'm sure the helpful community will assist you. If not, I'll locate your thread when I'm back.

    :classic:
    S. Rosland

  9. #8
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Phew. Thanks a lot! Man everybody here is so friendly. If u have time to read this thanks, ill try it although the phpMyAdmin files i have downloaded dont seem to have an install.txt files, so i will try redownloading them.

    Thanks very much, and i do know a little about SQL and web design etc, ive been web-designing for about a yr now and know HTML, CSS and Javascript and am trying to learn PHP at the moment.


    thanks again,
    tekp
    tekp :cheeky: tekponline.com

  10. #9
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Ok. Ive redownloaded "phpMyAdmin-2.5.4"
    When i open the unzipped folder of the same name i get loads of "file" files and the following .txt files:
    ANNOUNCE
    BadWords
    Documentation
    and a "documentation.html" webpage, and a cascading stylesheet called "docs". Plus the following directories:
    css
    images
    lang
    libraries
    scripts

    i cannot seem to find "install.txt" in any of these or the root directory.

    tekp
    tekp :cheeky: tekponline.com

  11. #10
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    I'll help you with this when I get home, if you haven't solved it by then.

    Try to open the file config.inc.php in a text editor, and follow the embedded instructions to enter values for "host, user and password". (as far as I can recall, that's all it takes to get it up and running)
    S. Rosland


Page 1 of 2 1 2 LastLast

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 03:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com