• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

Connect to mysql database with read-only mode hosted on different server

Hi Experts!

I need to connect to mysql database from different server (basically any server) in read only mode and access just one table. How to do it? First of all I need to use this piece of code in my phpmyadmin:
CREATE USER 'user'@'%' IDENTIFIED BY 'user';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION;

Open in new window

Is it enough to just modify this code somehow or do I need to do something more?
Thanks.
0
Zado
Asked:
Zado
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
In phpMyAdmin, each database has a 'Privileges' tab where you can choose the privileges you want a user to have on that database after you create the user.  You can restrict the user to having only Select privileges which is basically Read-Only.  Using the phpMyAdmin edit screen is a lot easier than trying to figure out the privileges list yourself.
0
 
ZadoAuthor Commented:
Just incase someone will experience similar problem, here's how to enable remote access to mysql server (connect from any server with wildcard '%'):
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now