MySQL Forums
Forum List  »  Connector/Arduino

Re: MySQL and Arduino Chapter 7
Posted by: Charles Bell
Date: April 08, 2014 11:43AM

I appreciate the feedback for the book. However, I should not answer questions concerning the book on this forum. But since it is related to the connector, allow me to explain...

The Ethernet.begin() method has several variants:

Ethernet.begin(mac);
Ethernet.begin(mac, ip);
Ethernet.begin(mac, ip, dns);
Ethernet.begin(mac, ip, dns, gateway);
Ethernet.begin(mac, ip, dns, gateway, subnet);

You must choose one of these to initiate the Ethernet class. As you can see, you must specify a MAC address for all variants.

DHCP is initiated with the first variant. In order to use this form, you must have a DHCP server running on your network. Otherwise, you will need to setup the Ethernet class with a static IP address. Which is what the other variants permit. The IP address in the last four are the IP address of your Arduino board.

With regard to the connector itself, you must specify the following items when connecting to the server:

- server IP address (the server where MySQL is being hosted)
- server PORT where MySQL is listening
- user name
- password

Example:

my_conn.mysql_connect(server_addr, port, user, password)

Options: ReplyQuote


Subject
Views
Written By
Posted
2458
March 31, 2014 01:35AM
1363
April 07, 2014 01:11AM
1264
April 08, 2014 11:31AM
1343
April 10, 2014 07:22PM
Re: MySQL and Arduino Chapter 7
1578
April 08, 2014 11:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.