Connecting to MySQL (1 Viewer)

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
My initial attempts to "blindly" connect Access to MySQL did not work-out. So I guess I will have to follow-up on "When all else fails, read the manual". I guess I will now have to move to Plan B, which is to actually read MySQL documentation.:eek:

Attached are a couple of screen shots. I don't know if they point to any obvious error. When I ping 127.0.0.1 from my Windows computer that has Access on it, it looks like I am hitting the MySQL database. (see image6.jpg)
Any thoughts on what may be wrong?

What I am thinking is that the MySQL database does not have any tables, therefore Access can't connect. I don't know whether that is true or not, but I will be reading up on creating some tables on MySQL and then seeing if I can get Access to connect.

I also ran across the following, that Mile-O provided some code for me to follow-up on.
 

Attachments

  • Image4.JPG
    Image4.JPG
    59.9 KB · Views: 291
  • Image5.JPG
    Image5.JPG
    64.8 KB · Views: 262
  • image6.JPG
    image6.JPG
    63.7 KB · Views: 261

Banana

split with a cherry atop.
Local time
Today, 08:04
Joined
Sep 1, 2005
Messages
6,318
Actually, the ODBC specifications require that you specify a database. You can't just "connect" to a server. At minimum you must provide three things: driver (you already did), server (you already did), and database (that's blank in all screenshots you have).

When you log in MySQL and execute a
Code:
use <databasename>;
, the <databasename> is the value you need to fill in for the database.
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
Ah that is the rub. I assume at this point, there is no existent database name to be used since no database has been created. The server is simply running.

I assume that my task will be be to read the MySQL manual and find our how to create a database.
 

Banana

split with a cherry atop.
Local time
Today, 08:04
Joined
Sep 1, 2005
Messages
6,318
Have you actually used MySQL client as well?
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
No.

I did install MySQL Administrator and it is working. However, the help file is missing and the folks at the MySQL forum, as of yet, have not responded.
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
Thanks. It will be several days before I can do much. All this stuff is at home, so I can't do it here at work.

-----------------------------------------------------------------------------
Well look what I found, as a follow-up to your link.

3.3.1. Creating and Selecting a Database

mysql> CREATE DATABASE menagerie;
------------------------------------------------------------------------------
Thanks again, I will need to read-up and see how things work-out.
 
Last edited:

Banana

split with a cherry atop.
Local time
Today, 08:04
Joined
Sep 1, 2005
Messages
6,318
Just one more suggestion-

Download the world database. It's a good starter database for you to play and learn about MySQL's stuff. (should be in the same link).

Best of luck!
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
Still looking for a solution. But here is a You Tube Video of how to connect Access to MySQL. Of course it works for him.:confused:

He does mention the need to allow remote logins, which could be a cause of my inability to connect.
 

Banana

split with a cherry atop.
Local time
Today, 08:04
Joined
Sep 1, 2005
Messages
6,318
exactly what 'solution are you looking for?
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
exactly what 'solution are you looking for?

Looks like the suggestion from Cabalas at the UBUNTU forum was correct. He suggested using the local IP address of the LINUX computer and not the standard 127.0.0.1. When I did that, the name of one table popped up and I did not get an error message. Still some work to do, as the test file "world" did not show up, but that was progress. Thanks.
 

Steve R.

Retired
Local time
Today, 11:04
Joined
Jul 5, 2006
Messages
4,674
Success, I was able to link my Access database to the sample "world" MySQL database on a Linux computer running UBUNTU. I was also able to adapt the VBA code provided by Mile-O on this forum to connect my Access database to the sample "world" database through ADO.

Eventually, I hope to transfer my Science Fiction Database off of WindowsXP and into a Linux based database.

I also imported an Analog Science Fiction magazine index developed by Dave Baranyi as an Excell spreadsheet into Access. He has over 6,000 entries, an amazing amount of work and dedication.

Thanks Banana for your patience and all your help.
 

Banana

split with a cherry atop.
Local time
Today, 08:04
Joined
Sep 1, 2005
Messages
6,318
Glad you were able to work it out yourself. Best of luck. :)
 

Users who are viewing this thread

Top Bottom