OPERATING SYSTEMSOS Linux

Install MySQL (MySQL Server) on your Ubuntu 22.04 LTS

In this video i have shown how you can download and install MySQL(mysql-server) on your ubuntu operating system specific on Ubuntu 22.04 LTS or 20.04 LTS or any newer version of ubuntu operating system. I have also shown how to fix the issue To fix Access denied for user ‘root’@‘localhost’ while opening mysql using mysql -u root -p.

Commands Used :
==============
sudo apt update
sudo apt-get install mysql-server

To check the version :
mysql – -version

To fix Access denied for user ‘root’@‘localhost’

sudo mysql -u root -p
show databases;
use mysql
update user set plugin=‘mysql_native_password’ where user=‘root’;

flush privileges;

Then finally Type :
mysql -u root -p

To create database :
create database demo;

Check all the available databases :
show databases;
==================================
PayPal : https://paypal.me/codewitharjun
Patreon : https://www.patreon.com/codewitharjun

➡️ Subscribe : https://www.youtube.com/codewitharjun

Stay Connected :
➡️ LinkedIn : https://np.linkedin.com/in/arjungautam1
➡️ Github : https://github.com/arjungautam1

Join Community :
➡️Discord : https://discord.gg/cn2x3jhMW4

Follow me on :
➡️ Medium: https://codewitharjun.medium.com/
➡️ Dev.to : https://dev.to/codewitharjun

#CodeWithArjun #Programming

source

ubuntu

27 thoughts on “Install MySQL (MySQL Server) on your Ubuntu 22.04 LTS

  • Howdy. Great instructions, easy to follow thanks a million. Now that i have it installed, how do I go about moving it to my second 1TB hard so that I can store all my databases there? Do you have a video that covers that? My installing nvme ssd is being used for system data only

  • my problem "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"
    still exist what to doo?

  • For debian users:

    mysql-server no longer works so do
    sudo apt-get install mariadb-server

  • Thank you so much sir for your help

  • sudo mysql -u root -p – i m not getting error again after entering this command . Error – ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

  • 3:00 i have ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) help me plz

  • You don't need that part with passwords, do you? I only installed mysql and it works with 'sudo mysql' …

  • if u face this error [ERROR 1054 (42S22): Unknown column '‘root’' in 'where clause'
    mysql> update user set plugin='mysql_native_password' where user='root';] its because of '‘root’' got different qoutes. so in order for you to fix either type the script by keyboard or use this one. update user set plugin='mysql_native_password' where user='root';

  • I have followed all of your processes shown on the video,but after writing the final command (mysql -u root -p) it still says "Access denied for user 'root'@'localhost' (using password:Yes).Please help me in finding the solution.

  • because of people like u who thinks these things may help others people like me survive thanks bro from heart❤

  • I'm new in Ubuntu and Linux. So the file is already in the system? It's just a matter of install it? You don't need to download it?

Comments are closed.