Try to run Python programm from command line. ImportError: No module named mysql.connector

I’m new in programming. So I have a question about this error.
I’m trying to run programm from command line in PyCharm, and get this Error.

root@kali:~# python /root/PycharmProjects/lesson/ProL3/ner.py
Traceback (most recent call last):
File “/root/PycharmProjects/lesson/ProL3/ner.py”, line 2, in
import mysql.connector as sql
ImportError: No module named mysql.connector

Prog:

import mysql.connector as sql
from mysql.connector import Error
import argparse


connection = sql.connect(
    host="localhost",
    password="mroot",
    user="myro"
)
mycursor = connection.cursor()

parser = argparse.ArgumentParser(description='Database management', usage='Script option:')
parser.add_argument('-d', '--data', help="Create Databases")
args = parser.parse_args()

class Data:
    def __init__(self, database=''):
        self.database = database
        self.create_database()

    def create_database(self):
        try:
            mycursor.execute(self.database)
            print("The database was created!")
        except Error as e:
            print(e)


What should I do?

Go to Source
Author: Boboc