Author Topic: How to install mysql?  (Read 5685 times)

Maialen

  • Guest
How to install mysql?
« on: May 19, 2016, 12:24:09 pm »
Hello.
I'm new with codeblock, and still costs me set up new things for me. I take hours trying to put a database with mysql, but I can not integrate with the environment.
I'm using wxWidgets with MinGW-w64 on Windows.
I followed all the tutorials / tips that I've found, but something I'm not doing well. Commented a bit of what I've done to someone can help me.

  • Download MySql conector: https://dev.mysql.com/downloads/connector/c/ (mysql-connector-c-6.1.6-winx64.zip)
  • Download MysQl Aux whith: libmysql.a and libmysql.lib
  • Put the content of conector/include on: C:\minGW-w64\mingw64\mysql
  • Copy libmysql.a to C:\minGW-w64\mingw64\lib
  • Copy libmysql.lib to System32 and SysWOW64 

After on Settings->Compiler->linker settings->Other linker options '-lmysql'

I also try from http://forums.codeblocks.org/index.php?topic=9236.0 but not work.

I can include #include <mysql.h> and compile.
But when I try the following code:

    MYSQL *connect;
    connect = mysql_init(NULL);

It can not compile, compilers said:
|undefined reference to `mysql_init'|


I am very confused and do not know how do it.

Help please.

Thank you very much



« Last Edit: May 19, 2016, 01:29:02 pm by Maialen »