After you've gotten mysql installed, there might be a few gotchas depending on your setup.
Check the config/database.yml to get the appropriate username
. You will also need to find the password
,
which will be placed in the IDENTIFIED BY ''
bit of sql below.
mysql -u root
Once in mysql, create a user of the appropriate name.
CREATE_USER 'simple_cms'@'localhost';
GRANT ALL PRIVILEGES ON *.*
TO 'simple_cms'@'localhost';
IDENTIFIED BY '';
CREATE DATABASE simple_cms_development;
exit
rake db:migrate
If you are seeing a problem such as
$ rake db:create --trace
rake aborted!
dlopen(/Users/username/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/username/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/username/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Try this
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
And checkout this out for more information