installing mySQL

dotKer

Member
Joined
Aug 16, 2019
Messages
69
Reaction score
14
Credits
0
I installed apache 2 days ago, and PHP 1 day ago.
Today I like to install mySQL.

if I type the following in the shell, is it install mySQL?
Code:
sudo apt install mySQL
 


usually (or at least in my experience) LAMPP is installed all in one go. How you do it and fine details depend on the distro your using .Also i think most are now shifting to Maria Db if your using sudo proabably your distro is one of the ubuntu variations

$ sudo apt install mysql-server
$ sudo mysql_secure_installation



might be a couple of your steps
 
Also i think most are now shifting to Maria Db
Then I like to install Maria DB instead of mySQL.

In order to install Maria DB, What shell command should I type?

The following code is would-be code which is not tested, but I think it shows what I want.
Code:
$ sudo apt install Maria Db-server
Does the code above work correctly for installing Maria Db?

if your using sudo proabably your distro is one of the ubuntu variations
What else can I use for installing my distro of the ubuntu variations, i.e xubuntu is out there instead of using sudo?
 
Last edited:
Installation from Ubuntu18.04 repositories:
Code:
apt update
Code:
apt install mariadb-server

The MariaDB service will start automatically. You can verify it by typing:
Code:
systemctl status mariadb

Code:
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset
Active: active (running) since Sun 2018-07-29 19:31:31 UTC; 38s ago
Main PID: 13932 (mysqld)
Status: "Taking your SQL requests now..."
    Tasks: 27 (limit: 507)
CGroup: /system.slice/mariadb.service
        └─13932 /usr/sbin/mysqld

You can also check the MariaDB version with:
Code:
mysql -V
Code:
mysql  Ver 15.1 Distrib 10.1.29-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

From the latest MariaDB repositories.:
Code:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Code:
add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.3/ubuntu bionic main'
Code:
apt update
Code:
apt install mariadb-server

Code:
systemctl status mariadb
 
Last edited:
when I enter the following
$ apt install mariadb-server
it says the following which is translated by myself from my mother-tongue to Enlgish
lock file
/var/lib/dpkg/lock- frontend file can't be opened approve denied.
unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-forntend), are you root?
How can I make it work?
 

are you root?

Do you execute these commands as root?
Root account or administrator on the system.
su enter
root password
and watch what you do :)
Code:
#apt install mariadb-server
# - means you are as root
you are leaving root exit

google linux commands root...

(There are those in free software that have Debian on the desktop and the FreeBSD server.)
 
Last edited:

Members online


Top