MySQL — pip myclient for Web APP Django

HermantoXYZ
1 min readJun 29, 2024

--

STEP 1

Installing MySQL Server

Download MySQL Server:

  • Select the MySQL Community Server edition appropriate for your operating system (e.g., Windows, macOS, Linux).
  • Download the installer. Link

Install MySQL Server:

a. Windows:

  • Run the installer (.msi file) you downloaded.
  • Follow the installation wizard instructions.
  • During installation, you’ll set up a root password for MySQL. Remember this password, as you’ll need it later.

b. macOS:

  • Download the .dmg package for macOS.
  • Double-click the downloaded package to mount it.
  • Drag the MySQL installer package to your Applications folder.
  • Open the package and follow the installation instructions.
  • During installation, you may need to provide your macOS user password and set up the root password for MySQL.

Verifying MySQL Installation

Once MySQL Server is installed and running, you can verify its status and log in to the MySQL shell to ensure everything is working correctly:

mysql --version

# Results

C:\Users\LEGION>mysql --versionmysql --version
mysql Ver 8.4.0 for Win64 on x86_64 (MySQL Community Server - GPL)

Login

mysql -u root -p

Show Users:

SELECT User, Host FROM mysql.user

Create User:

CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password';

Delete the Database:

DROP DATABASE database_name;

Create a new Database:

CREATE DATABASE database_name;

--

--

No responses yet