Mac MySql Instal

Discussion in 'Macintosh' started by Techno Child, Jul 2, 2006.

  1. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Hey everyone,

    Most of you have been bugging me about learning to use a SQL database... Well, now I tried and got myself into a little mess - I have no idea what my login info is!

    I downloaded the 4.0.2 Binary distro and installed it to my backup crapmac (g3 10.2 panther), then I installed CocoaMySQL on my iBook so I can manage my sql accounts remotely. Just one problem - I don't know what the root login is.

    Is there a default value or something that you have to change? During the installation, it didn't prompt me for a password or username.

    Please help,
    -tc
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Well to start with 4.0.2 is a bit old. You might want to get a newer version, but anyways....


    Code:
    /usr/local/mysql/bin/mysqladmin -u root password [i]yourpassword[/i]
    /usr/local/mysql/bin/mysqladmin -u root -h [i]ip_of_ibook[/i] password [i]yourpassword[/i]
    Once you have done this you will most likely need to also run it again but with the -h switch to give you remote access from your ibook. You can also use % as your hostname and that will let you connect from any remote address.

    Then your root password for the database server will be set. If you are using MySQL 4.0 then you should be fine with the normal version of CocoaMySQL, but if you get an updated version of MySQL (anything 4.1 or newer) then you will need to get CocoaMySQL-SBG.

    Also there are two good tools from MySQL for database administration and use.
    MySQL Administrator
    MySQL Query Browser
     
  3. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Ok, Thanks Geffy. I will try it this afternoon. But to make sure I understand - you are saying that if I put a "%" for the Ibook's IP Address, then I can connect with any IP? I only have a static ip set for the two servers, and that is only on my intranet - through the internet I connect with one ip, each server having different ports (2000, and 3000).

    Also, I instaled this version because I thought it was the best that my config could support - Php 4 and OSX 10.2 , Are newer versions of MySQL supported by this?
     
  4. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Ok, here is what I get when I type the first line in -

    Code:
    dyld: /usr/local/mysql/bin/mysqladmin Undefined symbols:
    /usr/local/mysql/bin/mysqladmin undefined reference to _stpcpy expected to be defined in /usr/lib/libSystem.B.dylib
    Trace/BPT trap
    and here is what I get with the second line -
    Code:
    dyld: /usr/local/mysql/bin/mysqladmin Undefined symbols:
    /usr/local/mysql/bin/mysqladmin undefined reference to _stpcpy expected to be defined in /usr/lib/libSystem.B.dylib
    Trace/BPT trap
    I have a feeling that this is not good. What did I do wrong?
     
  5. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    looks like you are missing some libs somewhere

    try getting the MySQL 5 Mac OS 10.3 download for PowerPC. Hopefully that should work otherwise you are likely going to have to download and install Darwin ports and install MySQL using that.
     
  6. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Ok, I installed 5.0 and it's giving me the same errors. What do I need to do to get it running? I would really like to keep the os at 10.2 if possible.
     
  7. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Think you'll have to build it from source I am afraid. Honestly though you might just be better installing it on your iBook.
     
  8. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Ehh, I was afraid you'd say that. On mac, I'm a little unsure of how to build an app from source. The purpose of the sql database was to run some scripts on my server that required it. Up until now I have been using flat files, and I figured that since my chatbox script needed a sql - now would be the best time to learn.

    I already have a mysql setup on my ibook, I installed it awhile back but never used it. I don't think it would help my server situation by having it installed on the ibook though.

    Is there an easy way of explaining what I should do to build mysql from source? I would need just the standard install - nothing extra, just enough to add/modify accounts through CocoaMySQL and to run a few simple scripts.
     
  9. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    easiest thing is get Darwin ports then

    sudo /opt/local/bin/port install mysql5

    and let it do its stuff, then to set the admin password use
    /opt/local/mysql/bin/mysqladmin
    or
    /opt/local/bin/mysqladmin

    why wont MySQL on your ibook help you?
     
  10. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Because it is not connected to my domain name... The scripts that need mysql are ones that I plan to put on my new site when it is finished. If I have the scripts on my server, having a database on my iBook won't help much with storing it's data correct?

    I am going to try those commands right now.
     
  11. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    It cannot find the comand "port" ... Is this something I should have downloaded?
     
  12. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    you installed darwin ports?
     
  13. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    What is darwin ports? Where do I download it from?
     
  14. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Google is your friend.
     
  15. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    Ok, I installed ports , and after typing the first command in I got this -
    Code:
    Failed to initialize ports system, dyld: /usr/bin/tclsh can't open library: /usr/lib/libcrypto.0.9.7.dylib  (No such file or directory, errno = 2)
     
  16. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    my my your system seems farked or some such. It should have the openssl libs on it
     
  17. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    hmm... It is a fresh install of 10.2 and I have installed all the updates to 10.2.8... Can I download and install openssl libs?
     
  18. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    /* Bump */
     
  19. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    I would have expected them to be there


    actually just thinking about it have you installed XCode tools yet? That might fix it
     
  20. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    I couldn't find it for 10.2 , remember when I was looking for it awhile back and could only find a 10.4 version?

    I am guessing that I can pretty much forget about setting up this database huh?