So all in all I need to get the username@domain and the dll file and it should work?
You would need to add 'a3762836'@'you_own_hostname' to the user table in the mysql installation and grant the necessary access. You can do that
with your own installation of MySQL but you
can't do this at a MySQL-provider. They just don't allow that. And 000webhost completely disables remote access for their free accounts.
A few questions.
1) When I compile the exe and send it to a friend they wont need the dll file will they?
2) What hosting are you using for the SQL? I want touse the same as it sounds easier
3) I have no idea how to add username@myhost and stuff
Sorry.
- Yes, he does need the libmysql.dll too. So you need to send both files.
- I don't have any open MySQL-connections to the internet. I have my own server for my internal network. My internal webpages (which a can host to the internet if i wanted to) access the locally installed MySQL-installation. My professional website is hosted by an internet provider. The MySQL-access there is also blocked and only accessible from their server (i.e. my professional website)
- You can only add the user@host with your own MySQL-installation. Others will never let you have access to it because it would be a security breach.
(no need to be sorry, i'm happy to explain it)
So... you have 4 options:
- Depending on what the program needs to do... you could create this in PHP (instead of Lazarus) and let the users go to your webpages at 000webhost where they interact with those pages.
- You can install your own MySQL-server and allow port 3306 for MySQL through your router to your PC. Your PC would need to be on for others to access your MySQL-server. You could use Xamp or Wamp for a complete and easy to install solution for a web and MySQL-installation
- Like option 1... you could create webpages (instead of a Pascal-program) and host them yourself on your own computer. For this options your computer also needs to be on when they want to access the pages and you can use the same Xamp or Wamp installation as option 2. In this case you wouldn't forward port 3306 but port 80 to your own computer.
- You can look for another MySQL-provider which allows external access. There are a few but I'm not sure what their quality is.
O... yeah... option 5.... pay for access to a MySQL-server
In that case they usually have an option for remote access. But always check beforehand. And if your program runs at multiple locations you need to make sure you have access from all those (or all) locations.
Your choice would all depend on what kind of program it is and who uses it.