Accessing MySQL DB into Excel 2010 powerpivot - excel

I have a MySQL DB on hostmonster.com and I am trying import data in excel powerpivot, but having hard time connecting to it.
Does anyone know if Excel powerpivot can even connect to MySQL?
Error I am seeing
Unable to retrieve list of databases. Reason: Failed to connect to the server. Reason: Login timeout expired
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
Named Pipes Provider: Could not open a connection to SQL Server [53].

I was looking for a way to feed data into MySQL (I know, there are better ways...) when I found this. So I was able to connect via odbc to Excel and using PowerPivot 2010 I was able to create a connection from MySQL to PP just fine. Here are the steps I took:
Select "Get External Data from Other Sources." (It's the db symbol to the right of "From Azure DataMarket.")
In the Connect to a Data Source table import wizard that comes up, select "Others (OLEDB/ODBC)"
Now it wants your connection string to your MySQL box, click on "Build." This brings up the "Data Link Properties" dialog, select the "Provider" tab, then the "Microsoft OLE DB Provider for ODBC Drivers." Select "Next." Now on the "Connection" tab, select "Specify the source of data: - use data source name: MySQL. (if you don't have this, you did not install the MySQL ODBC drivers.)
Click on "Test" and this should succeed if you have your user and password to MySQL correct. Now the "Connection String field is populated: "Provider=MSDASQL;Persist Security Info=False;User ID=root;DSN=MySQL" is what mine was.
The next step was a big one for me. The dialog says "Choose how to import the data" but when I selected "Select from a list of tables and views to choose the data to import" it could not find them for some reason, I selected "Write a query that will specify the data to import."
This brought up a query window and I added "select * from MySQL db.table_Sample
LIMIT 0, 1000"
It validated my SQL statements and imported the data. Very cool.

Try testing the connection trough windows "ODBC Data Source Administrator" first. I'm also having problems with PowerPivot specifically, but using normal Data Connection in Excel -does- work. You could also try that.
EDIT: Just found out that most PowerPivot connection issues get solved by falling back to an older MySQL ODBC driver. Version 3.51.30 does the trick. http://dev.mysql.com/downloads/mirror.php?id=406107
Credit where credit is due: http://www.joyofdata.de/blog/how-to-set-up-powerpivot-and-make-it-talk-to-mysql

I'm not familiar with powerpivot, but here is a link to the ODBC drivers for MySQL DB. Once installed I know you can connect to a MySQL database from Excel. I'm guessing powerpivot is the same. http://dev.mysql.com/downloads/connector/odbc/5.1.html

I've tried the same approach without success. Specifically:
i set up an ODBC connection to MySQL
PowerPivot seems to be able to see it when i use the Build wizard, and
connection test succeeds
when i go to import (via "Select from a list of table"), it fails with
an error in the SQL syntax (which of
course i didn't write).
So something's wrong somewhere under the hood.

Depending on what version of Windows you have, did you also go into Control Panel, administrative tools, data sources (odbc) to add the new MySQL driver you installed?

Related

Connecting an Access Database to Excel using an OLEDB Connection

I am wondering if anyone can help me? I have no real clue on how to do what I am attempting and I am just guessing based off the bits of information I have.
We use Microsoft Access to pull information out of our Trading program, we set this up via a DSN using an ODBC Connection.
We then pull the information out of Access into Excel. We have always gotten data from the Access databases as a Connection rather than a query if that makes sense? This way we can keep amending the Connection String and The command text to suit where as if you get the data via a query the options are greyed out in the connection properties in excel (I hope that sentence makes sense)
I need to add a second connection to an excel workbook, to get queries from two different databases, however I am struggling to create a connection from scratch, where for the last 12 years we have just been amending an existing connection and saving the spreadsheet under a new name no one here knows how to create a new connection.
I have tried the following > Get Data > From Database > From Microsoft Access Database
This imports but I am unable to change the SQL command text so its no good.
I am trying to add a connection via OLEDB using the following Connection String
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Database\Dormant Accounts.mdb;Driver={Microsoft Access Driver (.mdb)};*
But I am getting the error Details: "OLE DB: Could not find installable ISAM."
Microsoft Access Database Engine 2010 is installed, I have been googling all morning trying to find answers to this question but I am having no joy, Does anyone have any ideas how I can get this to work?
If it helps, the connection string we always copy and amend from is the following
DBQ=C:\Database\Revenue Report.mdb;DefaultDir=C:\Database;Driver={Microsoft Access Driver (.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;*
The only changing variable would be the file name, this works but I have no idea what the provider is or if this was even set up as an OLEDB connection.
Any help would be greatly appreciated, please let me know if you would need any more info

How to create a live excel connection to Redshift

I want to be able to connect excel with redshift.
So when I refresh this live connection in excel, it will refresh the query I write in redshift and return the newest result in excel.
I used to do it in a SQL Server using a stored procedure, and connect SQL Server with Excel using legacy wizard (under the get data option in data tab) - in the connection I specify the stored procedure, so every time I refresh Excel, it will fetch the updated result from SQL Server.
But now the company is using db visualizer to connect to redshift. I am not sure how to use the wizard to connect to Excel; do I need to use VBA? Any tips are welcome!
dbvisualiser is just an IDE that can point to redshift. it has no bearing on what you are trying to achieve.
you need to set up a link from excel through ODBC to Redshift. for that you need you redshift
host name
port
user name
password
You would also need these things to connect through dbvisualiser
to get connected - you could follow the instructions here
https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html

How to connect to oracle 9i database from excel?

I am working on oracle database.
I am using toad for that.
DB is in remote location say in IP 198.0.0.0
with user name as 'aaa' pwd as 'xxx'
I want to connect my DB to excel.
So that I can run query and get the results directly in excel.
Can I do that in excel 2003.?
If I can do, how to do connection.
I tried with Data - > Import external data - >New database query
It is not working
Thanks for your help,
I did googling.I didn't get help
You need to have an ODBC data source set up already and use that as your data source in Excel. The ODBC connection in turn points to your database. Of course this all assumes a properly installed Oracle client which is sounds like you have if you are able to use Toad, login and issue queries and see results.

excel 2007 connect to ssas 2005 cube

I have created a cube (ssas 2005), and can connect to it from excel 2007. I created a connection file (.odc). How can I set up other users to connect to the cube? I am new to this. Should they connect by creating a new connection as I do (specify server, authentication, and cube) or can I send the .odc file to them so they can open it? I don't want them to connect to the server directly because there are other cubes as well. Not sure about the usage of .odc file is it for sharing connection?
You can share the .odc file. The odc file is still connecting them to the SSAS server though, just that they don't have to type in server name or cube. You also need to make sure they actually have access to the cube with their username.
Be aware that your user can see the server and initial catalog in the connection string in their connection properties in Excel if they are smart enough to look there. If you have granted them access to view other cubes or access the AS database on the server, they can use this info to go to the server and look around.
Here's a link with more info on .odc files: http://office.microsoft.com/en-us/excel-help/create-edit-and-manage-connections-to-external-data-HA010167227.aspx#BMlearn_about_data_connections

Connecting MS Access database when another application using the same MS Access File

I'm having Silverlight with the c# application which connects to ms access database in the server. My connection string looks like,
Provider=Microsoft.JET.OLEDB.4.0; Data Source=\\151.12.1.99\DatabasePath\Database.mdb; Jet OLEDB:Database Password=Password;Mode= Read
It works fine when I execute the application directly without any error. But when I deploy the application it throws
"The Microsoft Jet database engine cannot open the file "\\151.12.1.99\DatabasePath\Database.mdb". It is already opened exclusively by another user, or you need permission to view its data.
Can any help me what is the problem? I'm opening the file in reading mode only.
Why dont you use a DSN instead ???
The problem is that once your app opens the .mdb file it stays "reserved" to that instance of the app. The easyest way arround this I think is to use a DSN, to let ODBC manage the database access.
conn.ConnectionString = "FIL=MS Access;DSN=your_dsn_name";

Resources