Binary_log_types.h: No such file or directory

I was compiling a small mysql C project and got stuck with below error:

 C:\Program Files (x86)\MySQL\MySQL Server 5.7\include/mysql_com.h:22:30: fatal error: binary_log_types.h: No such file or directory.

      

I did dir binary_log_types.h /b /s

on C:

disk, but I didn't find the binary_log_types.h file as such.

What's a possible workaround?

+3


source to share


3 answers


After a little research I found out that for some reason two files binary_log_funcs.h

and are binary_log_types.h

missing from the mysql 5.7 community installer installation.

Correction:

1) Download MySQL Server source code from MySQL site .

2) Extract the tar archive. (I used Winrar for this)



3) Goto Your \ Download \ Location \ Here \ mysql-5.7.7-rc \ mysql-5.7.7-rc \ libbinlogevents \ export \

4) Copy binary_log_funcs.h

and binary_log_types.h

from that folder and paste them in the path \ to \ your \ mysql \ server \ include.

5) Rebuild the Code :: Blocks app.

Note. Make sure Code :: Blocks has permission to access files and folders in the C: directory. Also, it might be a temporary fix, as I firmly feel that I haven't done a full install of mysql that should automatically include these files. Anyway, I'm temporarily happy :)

+2


source


Just confirmed the existence of this bug in MySQL 5.7.9 (64 bit):

C:\Program Files\MySQL\MySQL Server 5.7\include\mysql_com.h(22): fatal error C1083: Cannot open include file: 'binary_log_types.h': No such file or directory`  

      

I got this error message while compiling in Visual Studio 2013 Update 5, code based on MySQL communication to store data in a database.

My solution is a variation on sjsam's own answer. Go to the MySQL GitHub repository and open this folder / directory:

https://github.com/mysql/mysql-server/blob/5.7/libbinlogevents/export/ :

There are 2 files in this folder:



  • binary_log_funcs.h
  • binary_log_types.h

Save the 2 files to your computer using the file links (or copy the text from the file content, then save the text to text files with the same names as the originals), then put both files in your MySQL Server 5.7 \ include \ folder. Depending on your configuration, it can be one of the following 2:

C:\Program Files\MySQL\MySQL Server 5.7\include\

C:\Program Files (x86)\MySQL\MySQL Server 5.7\include\

Congratulations, you have now solved your problem. But I'm wondering why the developers at mysql.com didn't add these 2 files to the MySQL Community Server 5.7.9 installer package ...

+2


source


the following statement: from http://dev.mysql.com/doc/refman/5.6/en/binary-log.html

indicates that the mysql server should be started with the correct parameter

for the existence of the journal.

"To enable binary logging, start the server with the -log-bin [= base_name] option. If base_name is not specified, the default is pid-file (which is the default hostname), followed by -bin. If a basename is given, the server writes the file to the data directory, unless basename is specified with a leading absolute pathname, to specify a different directory.It is recommended that you specify basename explicitly rather than using the default hostname value, for this reason see Section B. 5.8 "Known issues in MySQL".

This same web page has a lot of related information.

0


source







All Articles