3

I have installed MySQL in Ubuntu 14.04 but I can't find the mysql.h file in any directory. I don't mean that the compiler can't find it, as mentioned in countless other questions, here but I can't find the actual file. Why is that? Where can I find it?

8
  • What's the outcome of find / | grep mysql.h?
    – Mitch
    May 28, 2015 at 16:38
  • try locate mysql.h May 28, 2015 at 16:39
  • @Mayur that is the whole point...Obviously that is what I am trying to do.
    – Adam
    May 28, 2015 at 16:40
  • 1
    What mysql package(s) did you install exactly? The file is part of the libmysqlclient-dev package May 28, 2015 at 16:40
  • 1
    @adam locate mysql.h is a command May 28, 2015 at 16:44

2 Answers 2

9

If you can't find mysql.h then it probably isn't anywhere in your filesystem unless you have one of these three packages installed which provides mysql.h:

  • libmariadbclient-dev - /usr/include/mysql/mysql.h
  • libmysqlclient-dev - /usr/include/mysql/mysql.h
  • pike7.8-mysql - /usr/lib/pike7.8/7.4/include/mysql.h
2
  • Thank you I installed the first and it the file was created.
    – Adam
    May 28, 2015 at 16:53
  • You can search the package for a missing file with eg: apt-file search /mysql.h
    – A.B.
    May 28, 2015 at 17:09
0

try $ find /usr/ -name 'mysql.h' or perhaps it is present at /usr/include/mysql/mysql.h. (Iam not sure)

1
  • I have searched in these directories according to the other answers here. The command that @Mitch proposed in the comments would have found it if it existed.
    – Adam
    May 28, 2015 at 16:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .