I'm trying to link in MS Access to the tables in a MySQL database on a remote computer. I'm using a system DSN (ODBC), but when I try to link to the tables (Link Tables dialog) the dialog is empty. No error message, just a empty list. I'm sure I've a connection because after changing the Limit Connectivity to Hosts Matching field in the MySQL security tab (MySQL Workbench) from "%" to only "localhost", I get an error. All fields in the Administrative Roles tab are checked!
A few questions for you to consider:
Is that DSN associated with the database schema which includes the tables you want linked?
Does the DSN work in the opposite direction ... can you export an Access table to MySQL using that DSN?
Are there any provisions in MySQL to monitor client connections, requests, and so forth?
I'm basically grasping at straws on this one. But I'm wondering if maybe the DSN is functional, but perhaps not pointing at the MySQL location which includes the tables you want.
Point #2 should tell you whether the DSN is working at all. If you can export, find out where the exported table wound up in MySQL and compare that with the location of your other tables.
Related
I want to allow MYSQL connectivity to business users on tableau without creating a DB user i.e. without allowing direct access to the database through the MYSQL workbench.
right now I have a MySQL user with grant access on only one database to connect through tableau. But business users can use this user to explore data through workbench and run queries, which is not ideal.
Is there a way to give MYSQL database access ONLY on tableau and not any database tools like workbench?
There is not such an option for it. But you can create/define user roles with restrictions on DB/table levels in MySQL or you can create two database(on same machine or another machine), one is Main(Primary) and other one for Tableau only, so if any Tableau users access the new(separate) database from any other application, they will have limited data(only which is using for Tableau dashboards).
So I found a solution for this and here it is, in case someone else has this issue.
I just published a live connection to my database table on tableau server, and embedded user credentials in tableu. This way anytime a user wants to use the data source they just need to select from published data sources. But we wont have to share user credentials with them, that resolves the issue and they wont be able to log in using any credentials from any database client.
I have two different instances on my workbench localhost and remote server instance shopify_data, (default schema sales_report). Now I want to fetch the data from table zipcode in localhost and other fields that are in another table shopify_orders in remote server shopify_data within sales_report.
The query looks like :
SELECT Name, billing_zip, Billing_Name, Billing_Address1,Billing_Address2, Lineitem_name, Created_at
FROM sales_report.shopify_orders
WHERE Created_at between '2017-08-31' and '2017-09-21' and Billing_Zip in (select zip_code from zipcode);
It gives error:
sales_report.shopify_orders does not exists.
How can I connect my local host instance with shopify_data instance and get data within the same query.
Thanks.
Deepak
PS: I don't want to import the shopify_orders into local host as the value keeps dynamically changing with each order and I don't want to repeat importing
It's not possible to access data stored on different servers in a single connection, with MySQL. You always open a connection to a single server and can work with DB objects available on that (provided you have the privileges for that).
I should add there's the option of federated tables. More precisly it's a storage engine, which allows to host data on a remote server in a local table, which then makes it possible to do joins with both local and remote data. But that requires to define such tables first and you cannot use FKs (and there are other limitations).
In workbench you can work with multiple databases on same server in crossing manner mean to say in query window of one database you can access other database tables also.
For this follow the following steps:
The database on which you are working on localhost create this as testdb on your remote server.
Create a mysql user "anydbuser" which can access all database of your server. In plesk this option come when user created from database selection dropdown choose ANY.
now connect testdb using anydbuser.
In query window you can try this query : select * from original_db_name.tablename;
you are able to access result of above db table into testdb query window
I was wondering whether there is a way to define a specific database in the connection setup of MySQL Workbench (I know this works with other database software). Sometimes I have a lot of different databases on one server and I only want to access one with one connection. Can I specify the database in the connection settings somehow?
YES, On the home tab Click the + in MySQL Connections. And put the database name in the Default Schema: when you fill in all the usual info about ip address etc
Now if you only want to see the one database, then create a new MySQL user account and only allow this new account access to this single database. Then change the connection to the database to use the newly created MySQL account.
I guess you are seeing all the databases because you are using the root account.
I have successfully migrated my mysql database file to an aws mysql instance using MySQL Workbench.
I now want to test that everything is migrated properly. When I connect to the db using MySQL Workbench and run an sql query such as
SELECT * FROM Users
I get an error saying that no database has been selected. I'm thinking that I'm actually only connected to the server and not the actual database. Is there a method to connect to the actual db and view all the tables on the server using MySQL Workbench or possibly another tool.
You never connect to a database. A database (aka schema) is just an organizational construct within a database server (aka RDBMS). So, first you connect to that server, to establish the communication. Then you select a schema to work with. Either run a USE command or, in MySQL Workbench, double click on a schema node in the schema tree on the left hand side to make this the current default. You can also set an initial default schema in the connection settings. The current (default) schema is shown in bold in the tree:
Figured it out.
There is a small expand button in the navigator panel on the left which can be expanded and I can view all my tables, columns etc...
I am new to databases, have done my basic "homework" regarding the theoretical part, and set about using MySQL Server through MySQL Workbench.
I have created four "connections" which appear on the Workbench homescreen dashboard, and I have also created some tables. But when I login through any connection (using user name and password), I can see all of the tables that I have created. So can anyone please tell me what is the point behind multiple connections then? What exactly is a "Connection" in MySQL Workbench?
I tried googling it, searched it on StackOverflow, and even referred the user manual of MySQL workbench, but got no answers.
Each MySQL connection contains its own set of definitions. For example, the connections might connect to different MySQL servers, or the same MySQL server with different usernames, or enable SSL for one, or you might set up a connection to a remote MySQL server using the SSH options, and so on.
As for multiple connections to the same local MySQL server, you might have one connection using "root" with another using a less privileged user. Depending on how you set up the users, they may (or may not) both have rights to see and use the same databases (information).
So to summarize, connections simply connect to the MySQL server. If two connections use the same exact information then the results will be identical. However, that is not a common use case.