MySQL urgent help.

Posted:
in Genius Bar edited January 2014
I have to have a dealer locator map finished by this Wednesday. I have one problem- I don't really know anything about MySQL.



Would this be the best way to set this up? Is there a GUI for Mac OS X to create and edit the actual databases? How do I actually setup the server? Can I use the mac to test the site and database- I'm using dreamweaver mx.



Or is there a step by step instruction guid on the web for doing this? I tried the MySQL site, but couldn't really find anything.



I'm so screwed if I don't get this done.



thanks a lot!

Comments

  • Reply 1 of 9
    You can go to mysql.com and learn about the commands. There is software to do it if you look on versiontracker.com I find that its easier to just use the terminal seeing how there isnt that many commands to actually use. Yes you can run it on your mac and test it with dreamweaver aswell. I do the same thing. If you would like some help setting it up feel free to IM me on aim at Silenti iechos.



    <a href="http://developer.apple.com/internet/macosx/osdb.html"; target="_blank">Apples mysql installation page.</a>



    <a href="http://www.mysql.com/documentation/index.html"; target="_blank">Mysql documentation</a>



    <a href="http://versiontracker.com/mp/new_search.m?productDB=mac&mode=Quick&OS_Filter=Ma cOSX&search=mysql&x=0&y=0" target="_blank">Version tracker search for mysql.</a>
  • Reply 2 of 9
    tacojohntacojohn Posts: 980member
    Thanks- this might help- I'll IM you if I have troubles.



    Thanks.
  • Reply 3 of 9
    torifiletorifile Posts: 4,024member
    <a href="http://www.phpmyadmin.net"; target="_blank">www.phpmyadmin.net</a>



    It's a web-based tool to administer mysql.



    Get the <a href="http://www2.entropy.ch/download/mysql-3.23.55.pkg.tar.gz"; target="_blank">mysql OS X package</a> from <a href="http://www.entropy.ch"; target="_blank">www.entropy.ch</a> and install that and <a href="http://www2.entropy.ch/download/mysql-startupitem.pkg.tar.gz"; target="_blank">the startup item</a>.



    Install the package, install the startup item, install phpmyadmin and you've got a functioning mysql server on your mac. HTH.
  • Reply 4 of 9
    tacojohntacojohn Posts: 980member
    ok- now- how do I tell if the MySQL server is running?



    and how do I create databases with it?
  • Reply 5 of 9
    boemaneboemane Posts: 311member
    [quote]Originally posted by tacojohn:

    <strong>ok- now- how do I tell if the MySQL server is running?



    and how do I create databases with it?</strong><hr></blockquote>



    To install the mySQL server go here: <a href="http://www.entropy.ch/software/MacOSx/mysql/"; target="_blank">MySQL installation page</a>



    If you want to install PHP too, go here:<a href="http://www.entropy.ch/software/MacOSx/php/"; target="_blank">PHP installation page</a>



    Keep in mind that you dont need PHP to use MySQL, only if you want to run phpMyAdmin (which can be downloaded from <a href="http://www.phpmyadmin.com)." target="_blank">www.phpmyadmin.com).</a>



    If you use PhpMyAdmin, you can create fields by choosing its name and attributes, etc. If you have installed the mysql package and wants to use it through the terminal, fire up the terminal and type the following:



    mysqladmin -u 'username' -p Table_Name



    change 'username' to your accual username, and type in the password when prompted.



    Once this is done you use the table Table_Name by typing the following in the terminal:



    mysql -u 'username' -p Table_Name



    same procedure, change username and type password when prompted.



    You are now 'logged in' with mysql ready to use the table Table_Name. You create tables by using the command:



    create table Table_Name (field type attributes, field type attributes);



    Like this:



    create table Accounts (AccountID int(4) primary key auto_increment, AccountName varchar(200), AccountOwner varchar(200));



    this will create a new table with three fields holding the unique AccountID, its name and its owner. More fields can be added by following the commands.



    you can select data from this table by using a select statement:



    select * from Accounts;



    or



    select * from Accounts where AccountName='Savings' order by AccountOwner asc;



    which will give you all Savings accounts in the table, ordered by the owners name in alfabetical order.





    If none of this helped, feel free to contact me on MSN Messenger at [email protected]



    .:BoeManE:.
  • Reply 6 of 9
    torifiletorifile Posts: 4,024member
    PHP is already preinstalled on OS X. You need to activate it by editing the httpd.conf file. Do this:



    [code]

    % sudo pico /etc/httpd/httpd.conf

    [type your password here]

    find the line that says "#LoadModule php4_module libexec/httpd/libphp4.so" and take out the #

    find the line that says "#AddModule mod_php4.c" and take out the # (the # comments the line out)

    add these two lines:

    AddType application/x-httpd-php .php

    AddType application/x-httpd-php-source .phps



    after the addtype application... (around line 855)

    ^X and y to save

    then at the prompt type:



    sudo apachectl restart

    </pre><hr></blockquote>



    That will enable php and restart apache.



    As others have said, follow the directions on the entropy.ch site and you should have both a function mysql installation and php working. HTH.
  • Reply 7 of 9
    tacojohntacojohn Posts: 980member
    Alright, when I try and start the MySQL server in the terminal it gives my this error:



    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)



    Does this mean I don't have the right permissions?
  • Reply 8 of 9
    That means it isn't running.
  • Reply 9 of 9
    torifiletorifile Posts: 4,024member
    [quote]Originally posted by tacojohn:

    <strong>Alright, when I try and start the MySQL server in the terminal it gives my this error:



    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)



    Does this mean I don't have the right permissions?</strong><hr></blockquote>



    Have you started it? type 'sudo safe_mysqld &' at the command prompt. If that doesn't work, you could always restart to get the startup item to start it for you.
Sign In or Register to comment.