Skip to content

MuhammadMooazam/MySQL-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Learn MySQL with Python

MySQL Logo

What is MySQL?

MySQL is a powerful, open-source Relational Database Management System (RDBMS) trusted by millions worldwide.

Who Uses MySQL?

MySQL is the go-to choice for developers, startups, and large enterprises. It's versatile and scales seamlessly.

Why Choose MySQL?

  • Widely Used: MySQL is a battle-tested RDBMS that has withstood the test of time.
  • Open Source: It's not just powerful; it's free and open-source, making it accessible to all.
  • Versatile: Whether you're crafting a small application or a sprawling, complex system, MySQL is your reliable companion.

What is Primary Key?

A primary key is a single field or combination of fields that contain a unique record. It must be filled. None of the fields of the primary key can contain a null value. A table can have only one primary key.

Now, let's roll up our sleeves and commence our journey!

Download and Installation

πŸš€ Download MySQL πŸš€

Your MySQL adventure begins here! Click the link above to initiate the MySQL download.

But hold on, there's more! We'll be your guides throughout the installation process, ensuring a seamless setup. Dive in and let's embark on this exciting voyage of mastering MySQL with Python!

Step 1: Choose Your Flavor

Visit the official MySQL website and download the Community Server Edition tailored to your operating system, such as Windows.

Step 2: Select Your Version

You have two options for downloading the setup:

  • mysql-installer-web-community (if you have a good internet connection)
  • mysql-installer-community (for slower connections)

Choose the one that suits your needs.

Download Options

Step 3: Unleash the Installer

Once the setup is downloaded, unzip it and run the MSI installer (.exe file). It will open up the installer wizard.

Installer Wizard

Step 4: Choose Your Destiny

Select the Full installation option in the wizard. This choice installs a comprehensive set of MySQL components, including MySQL Server, MySQL Shell, MySQL Router, MySQL Workbench, MySQL Connectors, documentation, samples, examples, and more.

Full Installation

Step 5: Handle Dependencies

The wizard may detect some missing requirements. You can resolve this by clicking Execute, which will install all necessary dependencies automatically. Alternatively, you can choose to skip them and proceed. Click Next when ready.

Resolve Dependencies

Step 6: Confirm and Continue

You'll be prompted to confirm your choices for installation. Click Yes to proceed.

Confirm Installation

Step 7: Server Configuration

Now, it's time to configure the MySQL Server. Choose Standalone MySQL Server/Classic MySQL Replication and click Next. You can also opt for InnoDB Cluster if it suits your needs.

Server Configuration

Step 8: Configuration Details

Select Development Machine as the Config Type and choose TCP/IP for connectivity. Set the Port Number to 3306. Then, click Next.

Configuration Details

Step 9: Authentication Method

Choose your preferred authentication method and click Next. The first option is a common choice.

Authentication Method

Step 10: Set the Root Password

Enter and confirm your MySQL Root Password, then click Next.

Set Root Password

Step 11: Windows Service Configuration

Keep the default settings for configuring the Windows Service. Click Next.

Windows Service Configuration

Step 12: Execute Server Configuration

If you're satisfied with the server configuration, click Execute to proceed.

Execute Configuration

Step 13: Configuration Complete

Once the configuration is complete, you'll see the following screen. Click Finish.

Configuration Complete

Step 14: Product Configuration

In the next screen, you'll find that the Product Configuration is complete. Stick with the default settings and click Next βž” Finish to finalize the MySQL package installation.

Product Configuration

Step 15: Configure the Router (Optional)

If you wish to configure the Router, click Next βž” Finish and then hit Next. image

Step 16: Connect to Server

In the next wizard, we will see the Connect to Server option. Here, we have to mention the root password, which we set in the previous steps. In this screen, it is also required to check whether the connection is successful or not by clicking on the Check button. If the connection is successful, click on the Execute button. Now, that the configuration is complete, click on Next. image

Step 17: Execute Applied Configurations

In the next wizard, select the applied configurations and click on the Execute button. image

Step 18: Finish Strong

After completing the above step, we will get the following screen. Here, click on the Finish button. image

Step 19: MySQL Installation Complete

Now, the MySQL installation is complete. Click on the Finish button. image

Verify MySQL installation

Once MySQL has been successfully installed, the base tables have been initialized, and the server has been started, you can verify its working via some simple tests.

Open your MySQL Command Line Client; it should have appeared with a mysql> prompt. If you have set any password, write your password here. Now, you are connected to the MySQL server, and you can execute all the SQL command at mysql> prompt as follows.

For example: Check the already created databases with the show databases command: image

Install Library in Python

To interact with MySQL in Python, you'll need to install the necessary libraries:

  1. pip install mysql
  2. pip install mysql.connector
  3. pip install mysql-connector-python

Enjoy your MySQL journey!

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published