mysql.h file can’t be found

The mysql.h file from the libmysqlclient-dev Ubuntu package is located at /usr/include/mysql/mysql.h. This is not a standard search path for compilers, however /usr/include is. You’d typically use the mysql.h header in your code like this: If you don’t want to specify the directory offset in your source, you can pass the -I flag to gcc … Read more

How to use python 3.5.1 with a MySQL database

I did the steps below with Python 3.5.1 and it works: Download driver from here Driver installation in cmd, in this folder Python\Python35\PyMySQL-0.7.4\pymysqlpython setup.py build python setup.py install Copy folder Python\Python35\PyMySQL-0.7.4\pymysql to Python\Python35\pymysql Sample code in python IDEimport pymysql import pymysql.cursors conn= pymysql.connect(host=’localhost’,user=’user’,password=’user’,db=’testdb’,charset=’utf8mb4′,cursorclass=pymysql.cursors.DictCursor) a=conn.cursor() sql=’CREATE TABLE `users` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(255) NOT NULL,`password` varchar(255) … Read more