Solved

Adding Remote ODBC Access for New MySQL Database

Posted on 2014-12-01
1
911 Views
Last Modified: 2014-12-20
Hey Guys -

I'm trying out a new app which requires a MySQL Database. Due to resources as well as not planning to use the app 100% of the time, I planned to install MySQL and create the database on a separate host than the app located within a VM.  The two systems are not on a domain, but on the same local network and I have full rights to each.  The system with the app is running Windows 8.1 and the MySQL server is running 2012 R2.

I installed MySQL and created a basic database.  Once done, I installed the ODBC connector locally on the MySQL server and was able to successfully connect.  I then installed the ODBC connector on the other server which has the app, but when trying to connect to the DB on the other server, I go the error:

Connection Failed
[MySQL][ODBC 5.3(w) Driver] Host '192.168.0.25' is not allowed to connect to this MySQL server:

Since then, I've been trying to research and find out how to grant it access.  After looking through many things, I found the below two "example" commands.

  mysql> update db set Host='10.199.15.46' where Db='webdb';
  mysql> update user set Host='10.199.15.46' where user='webadmin';

However, when I try to run the first one (using 'diskboss' instead of 'webdb', I get the error:

ERROR 1046 (3D000): No database selected

I then entered 'use diskboss' and tried the command again. but got:

ERROR 1146 (42S02): Table 'diskboss.db' doesn't exist

What am I doing incorrectly?  How can I add remote access?  I installed Workbench, too, but couldn't find an option to do it in there, either.  By the way, when I run 'show databases';, I get the below:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| diskboss           |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

Any suggestions?  Thanks!
0
Comment
Question by:BzowK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40473854
don't update system tables like that...

you want to GRANT permissions to the user connecting from a given (or any) host:
http://dev.mysql.com/doc/refman/5.7/en/grant.html
example:
GRANT SELECT, INSERT, UPDATE, DELETE on db_name.* TO `youruser`@`remotehost`
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question