I also copied the files found in the subdirectory mysql/ver40/ into the main mysql/ subdirectory, renaming them mysql_v4.pp, mysql_com_v4.pp and mysql_version_v4.pp, being sure to rename the units within each file correspondingly. I created a copy of testdb.pp called trydb.pp, rather than editing the original - this means that the original files still get fixed in subsequent CVS updates. The compiler needs to know where to find the mysql libraries (IF YOU HAVEN'T INSTALLED THE MYSQL DEVELOPMENT LIBRARIES, DO SO NOW!).The program needs to have user names and passwords to get access to the database. My system (SuSE Linux v9.0) installs mysql v4.0.15, not the version3 for which the package was designed.I found that the program could not connect to mysql for several reasons: Now try to run the test program testdb.pp (this may need to be compiled, and will almost certainly fail on the first attempt!!). You should see a table listing the ID, username and email address of some of the FPC developers. Before running the test script, you need to create a database called testdb: do this by logging into the mysql monitor (as root with full privileges) and issuing the following SQL statement This directory also contains the units mysql.pp, mysql_com.pp and mysql_version.pp. Possible paths for the mysql directory are /usr/share/fpcsrc/packages/base/mysql/ (rpm install) or C:\lazarus\fpcsrc\packages\base\mysql\ (windows). You can find the fpc source directory in Lazarus: Tools -> Options -> Files -> FPC source directory. There is a directory with an example program in $(fpc srcdir)/packages/base/mysql/. Test the action of the database system using the examples given in the manual, and check that all users really do have reliable access. It is preferable that all users including root have passwords. Make sure that the mysqld daemon runs reliably, and that all potential users (including root, mysql, yourself and anybody else that may need it) have as many privileges as they need, from as many hosts as may be needed (such as 'localhost', the local host's name, and other hosts on your network) as far as is consistent with security. I propose to move as much as possible to the GUI-oriented SQLDB Tutorial1 and create a separate page FPC database tutorial to create a text mode sample Get MySQL working in Linux or Windowsįollow the instructions in the MySQL User Manual.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |