Python connects to the database MySQL decompressed version installation configuration and encountered problems

Python connects to the database MySQL decompressed version installation configuration and encountered problems

introduction

Today I learned how to connect to the database with Python, so I wanted to install the MySQL database. Unexpectedly, I encountered a lot of setbacks with this small database, so I wrote down my installation process and problems to share with you.

MySQL download link: https://u20538204.ctfile.com/fs/20538204-384372135

step

1. Decompression

2. Configure the environment, add a MYSQL_HOME variable, and add a new path %MYSQL_HOME%\bin in the path;

3. Create a directory and add new files. Create a data folder under the MySQL installation path and add a new file named my.ini

4. Execute the mysqld --initialize statement to generate a series of files in the data folder

5. I executed mysqld --install, but the error "Install/Remove of the Service Denied" suddenly appeared. What should I do? Because we don't have administrator privileges, open Task Manager - File - Run New Task and select "Create this task with system administrative privileges"

6. Enter the bin directory again and run mysqld --install to install mysql

7. Run the net start mysql command to start the service

8. Run mysql -u root -p to log in. There is a temporary password for the first login, which is in the file ending with err in the data folder.

9. Of course, the first thing we do when we log in is to change set password for root@localhost = password('123');

Note: If we encounter The service already exists! during the installation process, or fail to start the MySQL service, we execute sc delete mysql to delete the MySQL service and also delete the files in the data directory, and then execute the above steps. There must be something wrong.

Summarize

The above is the installation and configuration of the unzipped version of Python connecting to the database MySQL and the problems encountered. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Python3 implements MySQL database connection pool sample code
  • Configure Python to connect to Oracle to read Excel data and write it to the database
  • Brief analysis of important matters in connecting to database in Python
  • Python connects to MongoDB database to operate data example
  • Implementation of Python connecting to MySQL database and reading data
  • Python connects to MySQL database and simple add, delete, modify and query operation example code
  • Python operation PostgreSQL database example [connection, addition, deletion, modification, query, etc.]
  • Detailed explanation of how to connect to SQLite database and perform addition, modification and query in Python
  • Detailed explanation of the process of connecting Python to PostgreSQL database
  • Python connection, query, update, and delete operations examples for MySQL database
  • Use Python to connect to MySQL database using the pymysql module
  • Python remote connection to MySQL database
  • Detailed explanation of various ways to connect Python to MySQL database
  • Teach you how to connect to sql server using python

<<:  Complete example of Vue encapsulating the global toast component

>>:  Nginx domain name SSL certificate configuration (website http upgraded to https)

Recommend

How to write a MySQL backup script

Preface: The importance of database backup is sel...

Try Docker+Nginx to deploy single page application method

From development to deployment, do it yourself Wh...

32 Typical Column/Grid-Based Websites

If you’re looking for inspiration for columnar web...

Analysis of basic usage of ul and li

Navigation, small amount of data table, centered &...

Display and hide HTML elements through display or visibility

Sometimes we need to control whether HTML elements...

WeChat Mini Program to Implement Electronic Signature

This article shares the specific code for impleme...

Understanding and usage scenarios of ES6 extension operators

Table of contents 1. Replace the apply method, ge...

Detailed steps for remote deployment of MySQL database on Linux

Linux remote deployment of MySQL database, for yo...

Vue's detailed code for implementing the shuttle box function

Vue - implement the shuttle box function, the eff...

Detailed explanation of TS object spread operator and rest operator

Table of contents Overview Object rest attribute ...

Detailed explanation of the new array methods in JavaScript es6

Table of contents 1. forEach() 2. arr.filter() 3....

Vue parent-child component mutual value transfer and call

Table of contents 1. Parent passes value to child...

HTML form application includes the use of check boxes and radio buttons

Including the use of check boxes and radio buttons...

border-radius method to add rounded borders to elements

border-radius:10px; /* All corners are rounded wi...