Home > Database > Mysql Tutorial > body text

What to do if mysql.h cannot be found

藏色散人
Release: 2021-12-28 14:09:20
Original
5059 people have browsed it

Solution to not finding mysql.h: 1. Directly enter "libmysqlclient-dev" in the software center to install; 2. Enter "sudo apt-get install libmysqlclient-dev" at the command line to install. .

What to do if mysql.h cannot be found

The operating environment of this article: ubuntu16.04 system, libmysqlclient-dev version, Dell G3 computer.

What should I do if mysql.h cannot be found?

linux cannot find mysql.h (cannot connect to mysql.h):

Write a C language program connect1.c to establish a connection with the MySQL database. Enter at the command line: gcc connect1.c -o connect1.exe -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient

Displaymysql.h## not found #, as shown below (Figure 1):

The reason is that when installing MySQL, only the MySQL server and MySQL client are installed, and MySQL database development is not installed. files.

Solution:

1. Graphical interface operation: directly enter MySQL database development files or libmysqlclient-dev in the software center, and click Install. (Figure 2 As shown)

2. From the command line: enter sudo apt-get install libmysqlclient-dev, enter the password (as shown in Figure 3), and enter whereis mysql.h after the installation is complete. /usr/include/mysql appears, indicating that mysql.h can be used.

Recommended study: "

mysql video tutorial

The above is the detailed content of What to do if mysql.h cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!