MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

How To Install MySQL server and client on Ubuntu?

Step 1 โ€” Installing MySQL


To install it, update the package index on your server if youโ€™ve not done so recently:
$sudo apt update

Then install the mysql-server package:
$ sudo apt install mysql-server

Ensure that the server is running using the systemctl start command:
$ sudo systemctl start mysql.serviceCode language: PHP (php)

$ mysql
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Rajesh$123sa332';
mysql> exitCode language: PHP (php)

Step 2 โ€” Configuring MySQL – NOT WORKING WITH LATEST


For fresh installations of MySQL, youโ€™ll want to run the DBMSโ€™s included security script. This script changes some of the less secure default options for things like remote root logins and sample users.

Run the security script with sudo:
$ sudo mysql_secure_installationCode language: JavaScript (javascript)
Terminal running mysql_secure_installation, enabling password validation with MEDIUM policy and setting root password
Mysql_secure_installation prompts skipped with Enter, privilege tables reloaded, ending in Success and All done

Step 3 โ€” Creating a Dedicated MySQL User and Granting Privileges


$ mysql -u root -p

$ CREATE USER 'sammy'@'localhost' IDENTIFIED BY 'DevOpsSchool$123';
$ GRANT ALL PRIVILEGES ON *.* TO 'sammy'@'localhost' WITH GRANT OPTION;
$ FLUSH PRIVILEGES;
$ exit
$ mysql -u sammy -p

# OPTIONAL Only for Reference
$ CREATE USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
$ ALTER USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
$ GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'sammy'@'localhost' WITH GRANT OPTION;Code language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Install and Configure Gerrit on CentOS and Ubuntu (MySQL + Apache Reverse Proxy)

A practical, step-by-step guide to installing Gerrit for code review on CentOS/RHEL and Ubuntu/Debian. Includes package command comparisons, setup workflow, Apache proxy configuration, and verification checks.

Read More

Install Enlightenment E17 from SVN/Source on Ubuntu (Legacy Method, Updated Guidance)

This revised guide explains the original 2010 workflow for installing Enlightenment E17 from source on Ubuntu using the easy_e17 script. It keeps the legacy commands intact while adding safety checks, verification steps, and modern caveats.

Read More

Datadog Log: Lab and Assignment

Lab Manual: Datadog Logs Search, Filter, Sorting, Display, and Analysis Hands-on Datadog Logs Explorer Lab using Ubuntu Linux Logs and Apache Logs Lab Objective By the end…

Read More

Kubernetes Installation & Configuration Guide

How to install Kubernetes 1.35 in Ubuntu 24.x Rajesh Kumar I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge,…

Read More

Install and Configure Prometheus Server and Node Exporter in Linux

There are 3 importants components to make sure Prometheus is up and running. We need to install and configure Prerequisite Prometheus Errors & Solution https://www.scmgalaxy.com/tutorials/prometheus-errors-solution Install and…

Read More

Kubernetes 1.23.6 Cluster Setup Master and Worker in Ubuntu 20.04

Latest doc – https://github.com/certifications-tutorials/kubernetes-cluster-setup Following commands would help you to create 1 Master and 1 Node in same VM. Run Following commands in Master Node Run following…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x