Results 1 to 9 of 9
  1. #1

    gotenks05's Avatar
    Member Since
    Oct 22, 2006
    Posts
    64
    database creation
    I am new to using MySQL, since I just got it to work with the help of somebody from a different Mac-focused forum today. I want to create a guestbook and require visitors of my site to log in to be able to upload things to my website. The trouble that I am encountering is that I typed up the php code to make and delete databases and one to make a table, but when I tell it to connect through the root user, for testing on my Mac, and open the file in Safari there is nothing, that my book tell me to expect (through illustrations), because the page is blank. I have installed the GUI tools from the MySQL site, which has made things a bit more simple, but I still cannot figure how to give the users permission to do this stuff, because I created another user and still no results of what I expected to see, just a black page instead of fields to fill in. I tried to download PHPMyadmin that I read about on another thread, but the installation instructions were not that clear, mainly because the only tar package was what the stuff came in. Is there anything else that I can use to easy control over MySQL besides the GUI tools and PHPMyadmin (preferably something that does not require compiling)?

  2. #2


    Member Since
    Dec 24, 2006
    Location
    N. Ireland
    Posts
    901
    Specs:
    Mac Pro 2xQuad core 2.8GHZ
    If you posted up your php code it would give us a bit more to go on.

  3. #3

    cazabam's Avatar
    Member Since
    Jun 06, 2006
    Posts
    1,153
    Specs:
    MacBook 2.0GHz White, 512MB RAM, 60GB HDD
    Why are you writing PHP code for stuff like database creation and table creation? You should probably just use the MySQL command line for that if you're getting started because then you can follow the tutorials and documentation on the Developer section of mysql.com.

  4. #4

    gotenks05's Avatar
    Member Since
    Oct 22, 2006
    Posts
    64
    Quote Originally Posted by cazabam View Post
    Why are you writing PHP code for stuff like database creation and table creation? You should probably just use the MySQL command line for that if you're getting started because then you can follow the tutorials and documentation on the Developer section of mysql.com.
    I did it in PHP, because I cannot access the command line, and the information listed in the terminal, after getting MySQL to run was not that clear to me. Sure I the GUI tools from the MySQL site, but the program in that package to do this stuff was an alpha version, with no help files. Next, I am learning this stuff from a book (it is written as if I am using windows/Linux, but the codes it tells me to type in work on Mac). I will post a zip file of those php files on my next post ( I still have the database creation script, but I need to recreate the others because I deleted them (out of frustration)).

  5. #5

    gotenks05's Avatar
    Member Since
    Oct 22, 2006
    Posts
    64
    Alright here is the zip file containing the three php scripts.
    Attached Files Attached Files

  6. #6

    cazabam's Avatar
    Member Since
    Jun 06, 2006
    Posts
    1,153
    Specs:
    MacBook 2.0GHz White, 512MB RAM, 60GB HDD
    There could be any number of problems ranging from PHP not having the MySQL libraries installed to the user not having permission. Unfortunately without more information I'd just be clutching at straws.

    Where are you hosting this if you can't get access to the command line? If it's a shared hosting account or similar that provides MySQL support they should be able to create the database for you. It's generally considered bad form to do thinks like creating databases and users in dynamic scripts. Creating the tables as a one-off installation is OK though.

  7. #7

    cazabam's Avatar
    Member Since
    Jun 06, 2006
    Posts
    1,153
    Specs:
    MacBook 2.0GHz White, 512MB RAM, 60GB HDD
    There could be any number of problems ranging from PHP not having the MySQL libraries installed to the user not having permission. Unfortunately without more information I'd just be clutching at straws.

    Where are you hosting this if you can't get access to the command line? If it's a shared hosting account or similar that provides MySQL support they should be able to create the database for you. It's generally considered bad form to do thinks like creating databases and users in dynamic scripts. Creating the tables as a one-off installation is OK though.

    edit: one other thing; when you put an @ before a function call it suppresses error messages. Take those away from the front of the mysql_* functions to get the actual error echoed to the screen.

  8. #8

    cazabam's Avatar
    Member Since
    Jun 06, 2006
    Posts
    1,153
    Specs:
    MacBook 2.0GHz White, 512MB RAM, 60GB HDD
    Oops, looks like a glitch with the inline editor. Can a mod delete the first of my two duplicate posts?

    Ta

  9. #9

    gotenks05's Avatar
    Member Since
    Oct 22, 2006
    Posts
    64
    Right now my site is hosted at http://www.kwikphp.com, because the host I originally had, which was at http://www.9999mb.com, deleted my account. There is no web-based control panel, so I cannot sign in and create databases. Also, my book said that MySQL features in PHP, were used with MySQL 4, but my current host gave me a url that began with sql3. For my testing purposes, I have tried to host it on my own computer (after getting the MySQL to work on Mac), and then upload it if it works correctly, except changing the MySQL connection info to what they gave me, instead of having in connect through the root user.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. iMovie creation
    By poppi in forum Movies and Video
    Replies: 2
    Last Post: 11-26-2013, 03:21 PM
  2. Wallpaper Creation
    By mvincent45 in forum Schweb's Lounge
    Replies: 0
    Last Post: 03-07-2012, 11:53 PM
  3. movie creation
    By The Lump in forum Movies and Video
    Replies: 1
    Last Post: 12-17-2008, 08:33 PM
  4. TV Commercial creation?
    By normal1 in forum Movies and Video
    Replies: 2
    Last Post: 10-22-2005, 10:00 PM
  5. Hybrid cd creation
    By charu123 in forum OS X - Apps and Games
    Replies: 0
    Last Post: 05-25-2005, 11:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •