connect to mysql database using 6.6xx
Moderators: gto, cipto_kh, EgonHugeist
connect to mysql database using 6.6xx
Hi..i want to ask how to connect to a mysql datbase.Also if i want to distribute the application?What must i include in the setup application?Thx a lot.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
1. How to connect to a mysql database:
Drop a TZconnectioncomponent on a form and set protocol to 'mysql' (or even better mysql-x, where x is the version). Set user, host and password. This can all be done at design time in the property inspector. When active is set to true a connection will be made.
2. To be able to run your application (or make a connection from the IDE) the system must be able to find the libmysql.dll file. (or the libmysqlxx.dll file) When running a standalone exe file just drop the dll next to your executable or in the system path. When running from the IDE the dll must be available in the system path. (ind win32\system32 should be OK on windows systems)
3. When adding to a setup application be carefull with licencing stuff. Mysql is a licenced product, so make sure you are allowed to distribute/package it with your application. Maybe you have to tell your client he should take the dll from his own mysql distribution or you need a mysql OEM licence.
Mark
Drop a TZconnectioncomponent on a form and set protocol to 'mysql' (or even better mysql-x, where x is the version). Set user, host and password. This can all be done at design time in the property inspector. When active is set to true a connection will be made.
2. To be able to run your application (or make a connection from the IDE) the system must be able to find the libmysql.dll file. (or the libmysqlxx.dll file) When running a standalone exe file just drop the dll next to your executable or in the system path. When running from the IDE the dll must be available in the system path. (ind win32\system32 should be OK on windows systems)
3. When adding to a setup application be carefull with licencing stuff. Mysql is a licenced product, so make sure you are allowed to distribute/package it with your application. Maybe you have to tell your client he should take the dll from his own mysql distribution or you need a mysql OEM licence.
Mark
If i include the mysql?
I'll give it a try.Thanks a lot.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Set this TZConnection properties:
- Protocol : mysql (or mysql-xx depending on your version, when you choose mysql, mysql-5 protocol will be used)
- Host : the server ip or name (default =empty -> localhost)
- Port : server port number (0=default mysql port)
- Database : the database name in the mysql server.
- User : the database user you connect with
- Password : the password the user needs to connect to the server.
- Protocol : mysql (or mysql-xx depending on your version, when you choose mysql, mysql-5 protocol will be used)
- Host : the server ip or name (default =empty -> localhost)
- Port : server port number (0=default mysql port)
- Database : the database name in the mysql server.
- User : the database user you connect with
- Password : the password the user needs to connect to the server.
need help again..
Hi..i want to ask again.What format of database should i choose? *.myi or which one.Thanks a lot.
Sorry,i've succeded.
I've succeeded connect.Sorry if i ask again.When i want to distribute the program,must the dcu's included in the setup?Thanks a lot.