Just a quick gotcha that I always stumble upon in Ubuntu. By default, the MySQL database is set only to listen to requests on the localhost (for security reasons). If you want to connect to the database remotely, say using MySQL Admin GUI Tools, you will need to make a quick change.
First run this to edit the MySQL config file with root permissions:
sudo vim /etc/mysql/my.cnf
Next, look for the property “bind-address” (press “/” in VIM to start a search). In Ubuntu server 7.04 it is on line 47 but this is total subject to change. Instead of it reading 127.0.0.1, change it to the static IP of the server. In most *nix distributions, this can be found by running “ifconfig”. My server configuration line now looks like this:
bind-address = 168.28.245.99
All that remains is to give the MySQL database a quick restart to apply the change:
sudo /etc/init.d/mysql restart
`GRANT ALL PRIVILEGES ON *.* TO newuser@”%” IDENTIFIED BY ‘newpassword’;`
No need to change the bind-address. If you want to restrict the user to a specific IP just change the % to the IP address. Or `newuser@”192.168.1.%”` etcetera.
LikeLike
Totally not related, but check this out: http://railsforphp.com/reference
You can search for the Ruby equivalent to PHP functions, like http://railsforphp.com/array or http://railsforphp.com/fopen etc.
Also, http://code.google.com/p/rtunnel/ may be of interest to you.
Matt Todd
LikeLike
I tried the newuser@â€%†method, but report it didn’t work for me. Only after I had changed the bind parameter in the configuration file did it have the expected result.
LikeLike