Your comment on

Name: 

Notify email: 

Comment:

  
       

home :: Dokumente :: MacOSX :: Leopard

 | Page 1 of 4 total pages | Next

Montag, 01 September 2008




Here's how I installed mysql on my new leopard OSX 10.5


I installed the latest mysql server from a binary distribution for osx tiger:


http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-5.1.22-rc-osx10.4-i686.tar.gz


I more or less followed the steps in the document "INSTALL-BINARY"


(don't need to create the mysql user as leopard already has a mysql user: _mysql)

cd ~/Downloads
curl http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-5.1.22-rc-osx10.4-i686.tar.gz -O
cd /usr/local
gunzip < ~/Downloads/mysql-5.1.22-rc-osx10.4-i686.tar.gz | tar xvf -
ln -s /usr/local/mysql-5.1.22-rc-osx10.4-i686 mysql
cd mysql
chown -R _mysql .
chgrp -R _mysql .
scripts/mysql_install_db --user=_mysql
chown -R root .
chown -R _mysql data


mysql's socket file doesn't seem to be at the location some apps expect it to be: /var/mysql/mysql.sock, instead it is at /tmp/mysql.sock


on solution would be to tell mysql to create the socket file at /var/mysql/ by writing the following into the file /etc/my.cnf

= /var/mysql/mysql.sock

[mysqld
socket = /var/mysql/mysql.sock


but that would mean that other applications wouldn't find it at /tmp


so I rather choose to make a symbolic link from /tmp/mysql.sock to /var/mysql/mysql.sock, but first mysql must be running so we can create the link (we can't create a link, if the target doesn't exist)

/usr/local/mysql/bin/safe_mysqld


or

sudo /usr/local/mysql/support-files/mysql.server start


now create the link:

ln -s /tmp/mysql.sock /var/mysql/mysql.sock


while we are at making symlinks, we whould make symlinks to the mysql binaries in /usr/bin/ as some appps and scripts expect to find mysql there:

for mysqlbin in mysql mysql_client_test mysql_client_test_embedded mysql_config \
mysql_convert_table_format mysql_find_rows mysql_fix_extensions \
mysql_fix_privilege_tables mysql_fix_privilege_tables_sql.c \
mysql_secure_installation mysql_setpermission mysql_tzinfo_to_sql mysql_upgrade \
mysql_waitpid mysql_zap mysqlaccess mysqlaccess.conf mysqladmin mysqlbinlog \
mysqlbug mysqlcheck mysqld mysqld-debug mysqld_multi mysqld_safe mysqldump \
mysqldumpslow mysqlhotcopy mysqlimport mysqlmanager mysqlshow mysqlslap \
mysqltest mysqltest_embedded ; do ln -s /usr/local/mysql-5.1.22-rc-osx10.4-i686/bin/$mysqlbin /usr/bin/ ; done


(Doesn't look very elegant, is there a more elegant way to do that?)



Now we may want to start the mysql server automatically at system start


Either use Lingon or a text editor to create the following file: /Library/LaunchDaemons/mysqlstarter.plist





Disabled

GroupName
_mysql
Label
com.mysql.mysqld
OnDemand

ProgramArguments

/usr/local/mysql/bin/safe_mysqld

RunAtLoad

UserName
_mysql
WorkingDirectory
/usr/local/mysql


At the next login this launchdaemon should start the mysqld server.


At this time the server is already running so we do not need to use the launchdaemon, but just for the record:


We could load the launchdaemon from the terminal with:

sudo launchctl load com.mysql.mysqld


Add comment | /Dokumente/MacOSX/Leopard | permanent link



Farbflash trac projects

Search

Tag cloud

Category
Show articles per page

RSS Feed

Links
  • 3DPI
    - Property Inspector to edit and explore all properties of a director #shockwave3d member. Without the 3DPI the whole 3-D stuff would be nearly undoable!
  • ULLALA
    Excellent examples and tutorials
  • DOUG
    Director online -- First place to look for Director related info
  • JAMES NEWTON
    another bunch of excellent demos and source code
  • MEKKA MEDIALIGHT LINGOWORKSHOP
    lots of excellent demos and source code from Luke Wigley
  • VALENTIN SCHMIDT
    lots of excellent xtras and source code. Home of the indispensable Shell Xtra!
  • XONKO
    Mark Hills site. Very good tutorials and other director and 3-D related stuff
  • INLUDO
    Barry Swans director demos and tutorials
  • Deans Director resources
    Dean Utians huge collection of resources and tutorials related to everything Director
  • THE HENDRIK DORGATHEN SITE
    not at all related to director, but one of my favorite graphic design art sites
  • SALINAS
    the site, of our local resistance against nuclear garbage (german)
  • TIMKID
    furniture for children (with some shockwave3d pieces)

Contact

Disclaimer

Donate
If one of the open source examples on this page helped you to get a paid job delivered, you might want to contribute and support my work by donating via PayPal...

Private
Login:
Passwort:

  
design and code by Alex da Franca