Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

install mysql on debian

first, update the packages: apt update and apt install gnupg

Next, download MySQL using wget command:
wget https://dev.mysql.com/get/mysql-apt-config_x.x.x-x_all.deb - x.x.x-x is the version.
then
sudo dpkg -i mysql-apt-config_x.x.x-x_all.deb
Update the apt repository:
apt-get update

Install the MySQL Server using the command:
sudo apt-get install mysql-community-server

Now, check the service status with systemctl:
systemctl status mysql.service

Next, run the command as a root user to safely configure the SQL service:
mysql_secure_installation

If you want to allow remote access, edit the file «mysqld.conf» in etc/:
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

At the end of the file, add the option "bind_address" with the value of localhost:
bind-address=127.0.0.1

Save the file and restart the service with systemctl:
systemctl restart mysql

 remember to open the MySQL port (it will be good to specify the standard MySQL port). If you use ufw:
ufw allow $yoursqlport

where instead of yoursqlport write your MySQL port.

If you use iptables:
iptables –A INPUT –p tcp –dport $yoursqlport –j ACCEPT
Comment

PREVIOUS NEXT
Code Example
Shell :: linux convert to sha256 
Shell :: OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
Shell :: linux back cd 
Shell :: git create new branch from current 
Shell :: ionic Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation. 
Shell :: git diff files of different branches 
Shell :: git revert to commit 
Shell :: shell script to reindex elasticsearch 
Shell :: whatsapp for linux 
Shell :: ubuntu add public key to server 
Shell :: ubuntu make executable 
Shell :: npm list versions of installed packages 
Shell :: docker created network and attach a docker container 
Shell :: ssh custom port fla 
Shell :: uninstall dependency npm 
Shell :: code to change the mac address kali linux 
Shell :: enable usb port ubuntu 
Shell :: how to run bash scripts 
Shell :: Mount EBS volume on Linux 
Shell :: cmd substring replace 
Shell :: .local ubuntu 
Shell :: git pull sith ssh key 
Shell :: env variable for access key and secret key in terraform 
Shell :: [INS-30131] Initial setup required for the execution of installer validations failed. 
Shell :: tr new line 
Shell :: install maven dependencies 
Shell :: git view branch 
Shell :: bash multiline ech 
Shell :: install conan 
Shell :: curl download file without output 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =