Monday, April 26, 2010

Remote MySQL Access

//switch to root user
su
//log in to mysql service
mysql -p
//grant access to user-remote host combination
GRANT USAGE ON *.* to root@'yourremotehost' IDENTIFIED BY 'newpassword';
//force update of authorization changes
FLUSH PRIVILEGES;




This will grant the user 'root' access to the MySQL server from 'yourremotehost'. At least that's what I expected. I fired up PHPMyAdmin, opened the 'MySQL' database, 'user' table and saw that the new user record was indeed created. Unfortunately, all the privileges of this new entry were set to 'N' (no, not allowed). I still don't know what went wrong, but to fix the problem, I simply manually edited the record using PHPMyAdmin to set them to 'Y'. That made it work in the end.

SQL File import

# mysql -u roundcube -p roundcubemail < SQL/mysql.initial.sql