• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Trying to use Mac for proper work"

Collapse

  • xchaotic
    replied
    Originally posted by Sysman View Post
    Nowadays there's also XAMPP. Free. Linux, OS X, Windows, Solaris versions available, which makes sense if you are running multiple platforms.

    I've only tried the Windows version myself, and it worked fine.
    +1 for XAMPP, works fine on my macs.
    Also you can try the VM approach, but not the best approach on RAM starved laptop and 20 million row dataset.

    Leave a comment:


  • Sysman
    replied
    Originally posted by stek View Post
    Best to download MAMP - there a free and paid for, both sort out MySQL without woes.

    MAMP: Mac, Apache, MySQL, PHP
    Nowadays there's also XAMPP. Free. Linux, OS X, Windows, Solaris versions available, which makes sense if you are running multiple platforms.

    I've only tried the Windows version myself, and it worked fine.

    Leave a comment:


  • myrkul
    replied
    I believe I fixed the issue with my.conf

    Durbs,

    You were able to get the my.conf files. You had about three of them, plus the one found on google.

    I used the default_my.conf file within the include directory, copied it to my desktop and renamed it to my.conf. I placed it in the proper folder /etc/
    and the I received the next error you received about the section on [mysqld] not being in the my.conf file.

    There is a section in the my.conf file called [mysqld.1], i renamed that section (renamed it when it was on my desktop) to [mysqld] and the setup of mysql workbench was complete.

    Leave a comment:


  • Sysman
    replied
    Originally posted by NickFitz View Post
    I think the locate database can be updated using the bash script at /usr/libexec/locate.updatedb (which appears to be part of the FreeBSD distribution judging by the copyright and comments). Of course it's always possible that some other way of doing it has also been added. There's a man page for it, available by typing man locate.updatedb in Terminal, or using your favourite GUI-based man page reader (I use ManOpen).
    Yes, locate.updatedb can be used, but starting with Leopard (or was it Tiger?), running it via sudo this spits out something like:
    "This WILL reveal all filenames on your machine to all login users, which is a security risk."

    and will probably leave the created file with no read access for non-admin users. If you really are the sole user of your system this may be what you want, but I don't currently do this myself.

    Instead of using periodic weekly, use

    sudo /etc/periodic/weekly/310.locate

    This will set the database ownership and protection correctly, but won't do the other weekly stuff like rotating logs.

    Here's a method for using Spotlight from the command line:
    1. put this into your .bash_profile

      function loc { mdfind "kMDItemDisplayName == '$@'wc"; }
      (should all be on one line)
    2. execute it via source .bash_profile
    3. see the results via loc my.cnf


    And as a GUI alternative to Spotlight, I use NotLight (scroll down or search that page to find it).
    Last edited by Sysman; 28 March 2010, 00:06.

    Leave a comment:


  • mbb
    replied
    +1 for mamp

    Leave a comment:


  • Ardesco
    replied
    Originally posted by NickFitz View Post
    OS X is based on FreeBSD, so it has all the usual Unix stuff like vi; however, there are some things that are different to Linux because of the different branches in the Unix family tree.

    I think the locate database can be updated using the bash script at /usr/libexec/locate.updatedb (which appears to be part of the FreeBSD distribution judging by the copyright and comments). Of course it's always possible that some other way of doing it has also been added. There's a man page for it, available by typing man locate.updatedb in Terminal, or using your favourite GUI-based man page reader (I use ManOpen).
    I'm aware they are *nix based and have poked around on one a couple of times for various test related things but I've never really used a Mac in anger hence my knowledge is limited

    Leave a comment:


  • NickFitz
    replied
    Originally posted by Ardesco View Post
    No idea about Mac but an updatedb normally refreshes the locate indexes on a Linux box.

    I would suggest looking at the file in a command line text editor to see if it looks correct (something like vi /etc/my.cnf don't know if Mac's come with vi though). If you copied and pasted from above it may have put in invalid carriage returns or something silly that is stopping MySQL from reading it properly. It should be instantly obvious if this has happened when you look at the file.
    OS X is based on FreeBSD, so it has all the usual Unix stuff like vi; however, there are some things that are different to Linux because of the different branches in the Unix family tree.

    I think the locate database can be updated using the bash script at /usr/libexec/locate.updatedb (which appears to be part of the FreeBSD distribution judging by the copyright and comments). Of course it's always possible that some other way of doing it has also been added. There's a man page for it, available by typing man locate.updatedb in Terminal, or using your favourite GUI-based man page reader (I use ManOpen).

    Leave a comment:


  • Ardesco
    replied
    No idea about Mac but an updatedb normally refreshes the locate indexes on a Linux box.

    I would suggest looking at the file in a command line text editor to see if it looks correct (something like vi /etc/my.cnf don't know if Mac's come with vi though). If you copied and pasted from above it may have put in invalid carriage returns or something silly that is stopping MySQL from reading it properly. It should be instantly obvious if this has happened when you look at the file.

    Leave a comment:


  • Sysman
    replied
    I can't remember where I got my installation of MySQL, but my locate command shows similar output to yours. Note by default locate only gets run on a Saturday morning (it runs off a database which is created weekly).

    My installation of MySQL put an icon into System Preferences > Other and from there I can start and stop it, or set it to run automatically on startup.

    Quick frig for updating the locate db on demand (e.g. after installing a pile of new stuff) is

    Code:
    sudo periodic weekly
    but be aware that that will rotate your log files as well.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by Durbs View Post
    That MAMP thing indeed looks good. May try that if all else fails but don't really need the 'A' and 'P' bits.
    Your Mac already has the "A" and "P" bits anyway, for all three values of "P"

    (PHP, Perl, and Python since you ask.)

    Leave a comment:


  • Durbs
    replied
    Thank you chaps.

    Getting there. Ran that locate thing - cheers Nick, is handy that, didn't work at first until i ran:

    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

    And it took a while to create the DB but it now shows i do have my.cnf's under

    /usr/local/mysql-5.1.45-osx10.6-x86/mysql-test/include/default_my.cnf
    /usr/local/mysql-5.1.45-osx10.6-x86/mysql-test/suite/federated/my.cnf
    /usr/local/mysql-5.1.45-osx10.6-x86/mysql-test/suite/ndb/my.cnf
    /usr/local/mysql-5.1.45-osx10.6-x86/mysql-test/suite/rpl/my.cnf
    /usr/local/mysql-5.1.45-osx10.6-x86/mysql-test/suite/rpl_ndb/my.cnf

    Tried these and also Ardesco's copy and it now gets further but it moans about missing sections:

    Checking command 'ps xa | grep "/usr/local/mysql/bin/[m]ysqld"'
    Server detected as running
    Check if /etc/my.cnf exists locally
    File was found in expected location
    Check if section for instance mysqld exists in /etc/my.cnf
    Operation failed: Couldn't find section mysqld in the config file /etc/my.cnf

    Thing is, i can see a 'mysqld' section in Ardesco's file but it cant. I'm sure i'll get there, will have a play later and if nothing else, at least i'm getting to know my Mac better as normally just use it for emailings and intrawebbings.

    That MAMP thing indeed looks good. May try that if all else fails but don't really need the 'A' and 'P' bits.

    Leave a comment:


  • Ardesco
    replied
    Here's an example one i found with a 5 sec google:

    Code:
    # Example MySQL config file for large systems.
    # Added support for very large database (>4GB) and
    # packets (>1MB) in order to import the Wikipedia
    # database dumps.
    #
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /usr/local/mysql/data) or
    # ~/.my.cnf to set user-specific options.
    
    # The following options will be passed to all MySQL clients
    [client]
    #password	= your_password
    #port		= 3306
    socket		= /tmp/mysql.sock
    
    # Here follows entries for some specific programs
    
    # The MySQL server
    [mysqld]
    #port		= 3306
    socket		= /tmp/mysql.sock
    skip-locking
    key_buffer = 256M
    max_allowed_packet = 256M
    table_cache = 256
    sort_buffer_size = 1M
    read_buffer_size = 1M
    read_rnd_buffer_size = 4M
    myisam_sort_buffer_size = 64M
    thread_cache = 8
    query_cache_size= 16M
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency = 2
    myisam_data_pointer_size = 7
    
    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (via the "enable-named-pipe" option) will render mysqld useless!
    # 
    skip-networking
    
    # Replication Master Server (default)
    # binary logging is required for replication
    log-bin=mysql-bin
    
    # required unique id between 1 and 2^32 - 1
    # defaults to 1 if master-host is not set
    # but will not function as a master if omitted
    server-id	= 1
    
    # Point the following paths to different dedicated disks
    #tmpdir		= /tmp/		
    #log-update 	= /path-to-dedicated-directory/hostname
    
    [mysqldump]
    quick
    max_allowed_packet = 256M
    
    [mysql]
    no-auto-rehash
    max_allowed_packet = 256M
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates
    
    [isamchk]
    key_buffer = 128M
    sort_buffer_size = 128M
    read_buffer = 2M
    write_buffer = 2M
    
    [myisamchk]
    key_buffer = 128M
    sort_buffer_size = 128M
    read_buffer = 2M
    write_buffer = 2M
    
    [mysqlhotcopy]
    interactive-timeout
    Just create a my.cnf in /etc/ and copy the above in.

    Job done.

    Leave a comment:


  • NickFitz
    replied
    I run MySQL on the Mac, and have done for years.

    locate my.cnf shows me that my copy is in /private/etc. I don't remember creating it myself.

    EDIT: it appears that /etc is just a symlink to /private/etc.
    Last edited by NickFitz; 21 March 2010, 18:41.

    Leave a comment:


  • stek
    replied
    Best to download MAMP - there a free and paid for, both sort out MySQL without woes.

    http://www.mamp.info/en/index.html

    Leave a comment:


  • Durbs
    started a topic Trying to use Mac for proper work

    Trying to use Mac for proper work

    Does anyone run MySQL on Mac?

    Tried to set up a MySQL instance on my Mac tonight to play with some postcode data. Gone to the MySQL downloads section at http://www.mysql.com/downloads/mysql/ and installed the (Mac OS X ver. 10.6 (x86, 32-bit), DMG Archive) Community Server package and then installed the Workbench GUI.

    The Workbench tool wont work as it says "Operation failed: File /etc/my.cnf doesn't exist"

    The MySQL server is running ok as i've looked up the bollox 'sudo /Library/StartupItems/MySQLCOM/MySQLCOM start' command to ensure the thing is running.

    It suggests that this installer should have created some sort of .cnf file but it doesn't, i don't have a my.cnf anywhere on the Mac.

    This is what really annoys me when people knock Windows, i really like my Mac but having set up MySQL and Workbench numerous times on Windows, its just a case of double clicking, it works and i can then get on with doing my work.

    Anyone know the score with these .cnf files? It suggests the installer should create examples like my-large.cnf but these don't exist either.

    Ta

    Edited, if its any help, what i see is:

    Checking command 'ps xa | grep "/usr/local/mysql/bin/[m]ysqld"'
    Server detected as running
    Check if /etc/my.cnf exists locally
    Operation failed: File /etc/my.cnf doesn't exist

    (but as i say, my.cnf doesnt exist at all on the machine - have i missed some step where you need to manually create this?)
    Last edited by Durbs; 21 March 2010, 00:13.
Working...
X