usual way to give read acces to a database is
mysql -u root databaseName # connect to database in mysql
grant connect to whoever ; # without password
grant connect to whoever identified by clever ; # with a passwd
grant connect to whoever@localhost ; # you must be logged whoever on localhost
see also
- http://dev.mysql.com/doc/refman/5.1/en/grant.html
- http://dev.mysql.com/doc/refman/5.1/en/create-user.html
Even if you want your user to copy the database, copying sould be done through :
mysqldump database | mysql -u whoever targetdatabase
Access
To acces file from client script
/var/lib/mysql/databaseNamesould berwxrwxr-x,/var/lib/mysql/databaseName:*sould berwxrwxr-x.