Friday, June 15, 2007

MySQL on MAC

Boy, switching to a MAC after years and years of PC's is tough, but I am enjoying it. I though I would provide a few hints where I had trouble and to me a little while figure out.

MySQL install went okay but I did have a few challenges.

  1. Know DOS but my unix/linix command skills are very rusty. So I relied on tranlation sites to get me through. Just google unix vrs dos commands. Ex. http://unixhelp.ed.ac.uk/DOStoUNIX.html
  2. Finding terminal. It's under applications and then utilities! Or just type terminal in Finder.
  3. Be sure to run a 3 files in the 5.0 download.
    1. mysql-5.0.41-osx10.4-i686.pkg //main install easy and quick
    2. MySQLStartItem.pkg //since we windows boys are mac dumb this like placing in you startup
    3. MySQL.prefPane //puts a monitor and start and stop tool in control panel
  4. Look in your Application folder to find the MySQL Query Browser
  5. I had trouble connecting with CF. It was because I needed another user added in the database
    1. open Terminal
    2. Type: sudo /usr/local/mysql/bin/mysql
    3. type in root password
    4. you should get a sql prompt mine: mysql>
    5. Connect to the main database by typing: use mysql
    6. User are found a table named user. Do: show tables; desc user;
    7. Add a new user with: create user test@localhost //if name is long you will need to use ticks. Ex 'joehammond'@'localhost'
    8. Set Password
      1. SET PASSWORD FOR 'test'@'localhost' = PASSWORD('newpass');
      2. FYI: the password are encypty to 32 bit. So use the password function shown above
      3. http://dev.mysql.com/doc/refman/5.0/en/set-password.html
    9. Create a test database:
    10. Apply Grants to test database to test user.
  6. Eclipse need the driver go here http://dev.mysql.com/downloads/connector/j/5.0.html
  7. Unpack. I placed the unzip folder in my liabrary
  8. Then in SQL Explorer under Eclipse Preferences setup the extra class path for MySQL driver.
Well, I know I left some gaps but I am tired of typing and want to play some more. I will try to add more later. If you have questions or get stuck just email me. joe.d.hammon@gmail.com

No comments: