Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
23いいね 2,049 views回再生

How to Install MySQL 8 on Ubuntu 18.04 LTS

In this video, We are going to show you How to Install MySQL 8 on Ubuntu 18.04 LTS
#installmysql8ubuntu #mysql8 #ubuntu
https://www.fosstechnix.com/install-m...

Step 1: Download and Install MySQL 8 APT Repository

Ubuntu comes with default package repositories and it is now latest version, if we want to add/install latest repositories then we have to add/install package repositories.

Below are commands to add/download MySQL APT repository using command line,
Download link,

https://dev.mysql.com/downloads/repo/...

$ sudo wget https://dev.mysql.com/get/mysql-apt-c...

Then, below command is to install above downloaded apt repository,

$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

when we run above command like below prompt will open, click on Ok.

Step 2: Install MySQL 8 on Ubuntu

Update the System packages
sudo apt-get update

Install MySQL 8 Server.

sudo apt-get install mysql-server

Next, you’ll we prompted to enter MySQL root password to access database.
After entering password , it’s asks for password encryption feature and it is recommended.

Step 3: Secure MySQL Installation

MySQL Server comes with a script mysql_secure_installation this can do multiple security related operations,

Run the below script on command prompt. you’ll first be need to enter the root password which you created during MySQL setup.

You will be asked to opt VALIDATE PASSWORD PLUGIN or not. This enables we to test MySQL Passwords and improve security.

Next, you have to enter yes or No to below security features,

Change the password for root ? ((Press Y|Y for Yes, any other key for No)
Remove anonymous users? (Press Y|Y for Yes, any other key for No)
Disallow root login remotely? (Press Y|Y for Yes, any other key for No)
Remove test database and access to it? (Press Y|Y for Yes, any other key for No)
Reload privilege tables now? (Press Y|Y for Yes, any other key for No)

$ mysql_secure_installation

Step 4: Login to MySQL Database

Use below command to login MySQL database

mysql -u root -p

here , -u flags specifies User Name and -p flags specifies Password.

Step 5: Create MySQL Remote User

First, Login to MySQL Server with root user using command line,

Login to MySQL using username root and password

mysql -u root -p

Start,Stop,Restart and Status of MySQL Service

To start MySQL Service

$ sudo systemctl start mysql.service

To stop MySQL Service

$ sudo systemctl stop mysql.service

To restart of MySQL Service

$ sudo systemctl restart mysql.service

To check status of MySQL Service

$ sudo systemctl status mysql.service

コメント