Can't connect to local MySQL database using Cr

2019-09-05 03:02发布

问题:

I'm trying to create a report using Crystal Reports and that first requires connecting to my local MySQL Database.

I'm using this database connector string:

Driver={MySQL ODBC 5.3.6 Driver};Server=localhost:3306;Database=mcs;User=admin;Password=admin123;Option=3

I get this error:

The connector is installed and the MySQL database is there.

回答1:

  • start >> search microsoft odbc administrator
  • on user dsn click add >> search mysql odbc (if not found close >> right click on microsoft odbc administrator >> properties >> set target to "C:\Windows\SysWOW64\odbcad32.exe")
  • set data source name=localhost >> tcp/ip=127.0.0.1 >> port=3306 >> user=admin >> password=admin123
  • click test >> select database=mcs >> ok
  • open database expert on crystal report >> make new connection >> odbc
  • check select data source >> choose your data source name >> finish