Actually I am using Ubuntu 16.04 and python3 so in that when I am importing MySQL.connector and CGI in a single file the file is not working showing the error
#!/usr/bin/python3
import cgi
import mysql.connector as msql
Segmentation fault (core dumped).
These both are not working simultaneously but working individually.