Notification texts go here Contact Us Buy Now!

Cara Menginstal MYSQL di Linux

 


Hallo sobat kali ini admin akan membahas sedikit tutoiral bagai mana sih cara menginstal mysql di linux. Nah untuk menginstalnya cukup mudah, kita akan menginstal mysql di https://dev.mysql.com/ sehingga kita tidak perlu lag paket bawaan dari repository kali linux melaikan reposiroty yang dibawakan oleh MYSQL itu sendiri.

Import Repository MYSQL ke dalam linux

Jalankan perintah di bawah ini untuk dapat menginstal mysql ke dalam linux, gunakan perintah di bawah ini.
$ sudo apt update
$ sudo apt install -y wget
$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
$ sudo apt install ./mysql-apt-config_0.8.22-1_all.deb
Selanjutnya lakukan configurasi seperti di bawah ini.


Pilih MySQL Server dan Cluster (Currently selected: mysql-8.0).


Kemudian pilih mysql-8.0


Lalu  memastikan MySQL nya sudah terpilih dan MySQL Tools & Connector sudah Enabled secara default, langsung saja pilih Ok.


Otomatis repository akan melakukan update.
Hit:1 http://ppa.launchpad.net/umang/indicator-stickynotes/ubuntu jammy InRelease                
Get:2 http://repo.mysql.com/apt/debian bullseye InRelease [12.9 kB]                  
Get:4 http://repo.mysql.com/apt/debian bullseye/mysql-8.0 Sources [942 B]        
Get:5 http://repo.mysql.com/apt/debian bullseye/mysql-apt-config amd64 Packages [567 B]
Get:6 http://repo.mysql.com/apt/debian bullseye/mysql-8.0 amd64 Packages [8,435 B]
Get:7 http://repo.mysql.com/apt/debian bullseye/mysql-tools amd64 Packages [6,904 B]
Hit:3 https://mirror.anigil.com/kali kali-rolling InRelease                                                 
Fetched 29.7 kB in 29s (1,024 B/s)                  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
11 packages can be upgraded. Run 'apt list --upgradable' to see them. 
Jika terjadi error kamu bisa menggunakan perintah di bawah ini.
$ apt update 
Untuk versi kali linunx 2022.x silahkan instal mysql dengan menggunakan perintah di bawah ini.
$ apt install mysql-community-server
Lanjutkan dengan menekan Y.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client
  mysql-community-client-core mysql-community-client-plugins mysql-community-server-core
The following NEW packages will be installed:
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-community-client
  mysql-community-client-core mysql-community-client-plugins mysql-community-server
  mysql-community-server-core
The following packages will be upgraded:
  mysql-common
1 upgraded, 10 newly installed, 0 to remove and 10 not upgraded.
Need to get 36.2 MB of archives.
After this operation, 288 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Tunggu hingga seratus persen, dan kemudian masukan password root kalian.

Masukan kembali password kalian untuk melakukan verifikasi ulang.

Pilih autentikasi password seperti di bawah ini.

Agar mysql dapat berjalan ketika booting jalankan perintah berikut.
$ sudo systemctl enable mysql 
Lalu lakukan pengecekan apakah sudah berjalan atau belum.
$ systemctl  status  mysql
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: disabled)
     Active: active (running)
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
    Process: 9537 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 9572 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 4613)
     Memory: 263.6M
        CPU: 450ms
     CGroup: /system.slice/mysql.service
             └─9572 /usr/sbin/mysqld
Jalanakan perintah di bawah ini untuk masuk ke dalam  data base mysql.
$ mysql -u root -p 
Masukan password yang sudah kamu setting tadi, dan jika berhasil akan muncul mysql console seperti di bawah ini.
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 9
Server version: 8.0.29 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> 

Getting Info...

About the Author

IT Enthusiast

Posting Komentar

Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.