Implement a Python script that reads data from a CSV file and inserts it into a MySQL table. The script should accept command line arguments for the CSV file path, MySQL connection details (host, port, username, password, and database name), and the target table name.

To implement this script, you can use the `csv` module to read data from a CSV file and the `mysql-connector-python` package to connect to a MySQL database. First, make sure to install the required package:

```bash
pip install mysql-connector-python
```

Now create a Python script called `csv_to_mysql.py` with the following content:

```python
import csv
import sys
import mysql.connector
from mysql.connector import Error

def main():
    if len(sys.argv) < 8:
        print("Usage: python csv_to_mysql.py <csv_file> <host> <port> <username> <password> <database> <table>")
        return
    
    csv_file = sys.argv[1]
    host = sys.argv[2]
    port = int(sys.argv[3])
    username = sys.argv[4]
    password = sys.argv[5]
    database = sys.argv[6]
    table = sys.argv[7]

    try:
        connection = mysql.connector.connect(
            host=host,
            port=port,
            user=username,
            password=password,
            database=database
        )

        cursor = connection.cursor()

        with open(csv_file, 'r') as f:
            reader = csv.reader(f)
            header = next(reader)

            for row in reader:
                placeholders = ', '.join(['%s'] * len(row))
                query = f"INSERT INTO {table} VALUES ({placeholders})"
                cursor.execute(query, tuple(row))

        connection.commit()
        print(f"{cursor.rowcount} rows inserted into {table}")

    except Error as e:
        print(f"Error: {e}")
    
    finally:
        if connection.is_connected():
            cursor.close()
            connection.close()
            print("MySQL connection closed")

if __name__ == "__main__":
    main()
```

You can now run the script from the command line, providing the required arguments:

```bash
python csv_to_mysql.py data.csv localhost 3306 myuser mypassword mydatabase mytable
```

Make sure to replace the placeholders with your actual MySQL connection details and CSV file path. The script will read the CSV file and insert its content into the specified MySQL table.