Skip to content
WONGCW 網誌
  • 首頁
  • 論壇
  • 微博
  • 壁紙下載
  • 免費圖床
  • 視頻下載
  • 聊天室
  • SEO工具
  • 支援中心
  • 表格製作
  • More
    • 在線名片
    • 網頁搜索
    • 天氣預報
    • 二維碼生成器
  • Search Icon

WONGCW 網誌

記錄生活經驗與點滴

How to Install MySQL 8.0 in Ubuntu 18.04

How to Install MySQL 8.0 in Ubuntu 18.04

2018-10-26 Comments 0 Comment

MySQL community server is a free open source, popular and cross-platform database management system. It supports both SQL and NoSQL, and has a pluggable storage engine architecture. Additionally, it also comes with multiple database connectors for different programming languages, allowing you to develop applications using any of the well known languages, and many other features.

It has many use cases under document storage, cloud, high availability systems, IoT (Internet of Things), hadoop, big data, data warehousing, LAMP or LEMP stack for supporting high-volume website/apps and much more.

In this article, we will explain a fresh installation of MySQL 8.0 database system on Ubuntu 18.04 Bionic Beaver. Before we move onto the actual installation steps, let’s look at a summary of:

What’s New in MySQL 8.0

  • The database now incorporates a transactional data dictionary.
  • Comes with Atomic DDL statement support.
  • Enhanced security and account management.
  • Improvements to resource management.
  • Several InnoDB enhancements.
  • New type of backup lock.
  • Default character set has changed to utf8mb4 from latin1.
  • A couple of JSON enhancements.
  • Comes with regular expression support using International Components for Unicode (ICU).
  • New error logging which now uses the MySQL component architecture.
  • Enhancements to MySQL replication.
  • Supports common table expressions(both non-recursive and recursive).
  • Has an enhanced optimizer.
  • Additional window functions and more.

Step 1: Add MySQL Apt Repository

Luckily, there is an APT repository for installing the MySQL server, client, and other components. You need to add this MySQL repository to your system’s package sources list; start by downloading the repository package using the wget tool from the command line.

$ wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb 

Then install the MySQL repository package using the following dpkg command.

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

Note that in the package installation process, you will be prompted to choose MySQL server version and other components such as cluster, shared client libraries, or the MySQL workbench that you want to configure for installation.

MySQL server version mysql-8.0 will be auto-selected, then scroll down to the last option Ok and click [Enter]to finish the configuration and installation of the release package, as shown in the screenshot.

Configure MySQL APT Config

Configure MySQL APT Config

Step 2: Install MySQL Server in Ubuntu 18.04

Next, download the latest package information from all configured repositories, including the recently added MySQL repository.

$ sudo apt update

Then run the following command to install packages for the MySQL community server, client and the database common files.

$ sudo apt-get install mysql-server
Install MySQL 8.0 in Ubuntu 18.04

Install MySQL 8.0 in Ubuntu 18.04

Through the installation process, you will be asked to enter a password for the root user for your MySQL server, re-enter the password to confirm it and press [Enter].

Set MySQL Root Password

Set MySQL Root Password

Next, the MySQL server authentication plugin configuration message will appear, read through it and use the right arrow to choose Ok and press [Enter] to continue.

MySQL Authentication Configuration

MySQL Authentication Configuration

Afterwards, you will be asked to select the default authentication plugin to use, then use the right arrow to choose Ok and press [Enter] to complete the package configuration.

Select MySQL Authentication Plugin

Select MySQL Authentication Plugin

Step 3: Secure MySQL Server Installation

By default, the MySQL installation is unsecure. To secure it, run the security script which comes with the binary package. You will be asked to enter the root password you set during the installation process. Then also choose whether to use the VALIDATE PASSWORD plugin or not.

You can also change the root password you set before (as we have done in this example). Then enter yes/y to the following security questions:

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

Launch the script by issuing the following command.

$ sudo mysql_secure_installation
Secure MySQL Server Installation

Secure MySQL Server Installation

To further secure your MySQL server, read our article 12 MySQL/MariaDB Security Best Practices for Linux.

Step 4: Managing MySQL Server via Systemd

On Ubuntu, after installing a package, it’s service(s) are usually started automatically once the package is configured. You can check if the MySQL server is up and running using following command.

$ sudo systemctl status mysql
Check MySQL Server Status

Check MySQL Server Status

If for one reason or the other, it isn’t auto-started, use the commands below to start and enable it to start at system boot time, as follows.

$ sudo systemctl status mysql
$ sudo systemctl enable mysql

Step 5: Install Extra MySQL Products and Components

In addition, you can install extra MySQL components that you feel you need in order to work with the server, such as mysql-workbench-community, libmysqlclient18 and many others.

$ sudo apt-get update
$ sudo apt-get install mysql-workbench-community libmysqlclient18

Finally, to access the MySQL shell, issue the following command.

$ sudo mysql -u root -p
Connect to MySQL Server

Connect to MySQL Server

分享此文:

  • 按一下即可分享至 X(在新視窗中開啟) X
  • 按一下以分享至 Facebook(在新視窗中開啟) Facebook
  • 分享到 WhatsApp(在新視窗中開啟) WhatsApp
  • 按一下以分享到 Telegram(在新視窗中開啟) Telegram
  • 分享到 Pinterest(在新視窗中開啟) Pinterest
  • 分享到 Reddit(在新視窗中開啟) Reddit
  • 按一下即可以電子郵件傳送連結給朋友(在新視窗中開啟) 電子郵件
  • 點這裡列印(在新視窗中開啟) 列印

相關


Linux資訊, 教學資源

Post navigation

PREVIOUS
General Dynamics发布最新款超便携无人潜水器Bluefin-9
NEXT
手把手教你Ubuntu下如何安装mysql

發表迴響取消回覆

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料。

More results...

Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Filter by 分類
網站公告
Featured
限時免費
Windows 軟件下載
系統軟件
辦公軟件
圖像處理
影音媒體
網絡軟件
應用軟件
Mac 軟件下載
安卓軟件下載
網絡資訊
Mac資訊
Linux資訊
VPS資訊
NASA資訊
WordPress資訊
WeChat資訊
PHP資訊
教學資源
開源程序
網頁工具
SEO工具
醫療健康
其他資訊
Content from
Content to
2018 年 10 月
一 二 三 四 五 六 日
1234567
891011121314
15161718192021
22232425262728
293031  
« 9 月   11 月 »

分類

  • 網站公告
  • 限時免費
  • Windows 軟件下載
  • 系統軟件
  • 辦公軟件
  • 圖像處理
  • 影音媒體
  • 網絡軟件
  • 應用軟件
  • Mac 軟件下載
  • 安卓軟件下載
  • 網絡資訊
  • Mac資訊
  • Linux資訊
  • VPS資訊
  • NASA資訊
  • WordPress資訊
  • WeChat資訊
  • PHP資訊
  • 教學資源
  • 開源程序
  • 網頁工具
  • SEO工具
  • 醫療健康
  • 其他資訊

彙整

近期文章

  • 消息稱Manus母公司擬融資1億美元資金用於發展中國業務 2025-05-14
  • Unity威脅撤銷《DayZ》開發者工作室的軟體授權 2025-05-14
  • 特斯拉煥新Model Y遇冷:上市即促銷沒有”新”賣點 2025-05-14
  • 從太空俯瞰的生態警報:高山植物基因庫正加速流失 2025-05-14
  • 宇宙壽命大縮水科學家將毀滅倒數提前萬億倍 2025-05-14
  • 疫苗難產、藥物稀缺人類與真菌的戰鬥正陷入困境 2025-05-14
  • AI顛覆製藥業:數月設計抗體藥物挑戰傳統研發 2025-05-14
  • 大疆確認Mavic 4 Pro將不會在美國上市 2025-05-14
  • 京東CEO:騎手工服嚴重缺貨正在趕工 2025-05-14
  • 白宮大幅削減小額包裹關稅稅率美國業界卻有另一番見解 2025-05-14

熱門文章與頁面︰

  • 您可以在Windows 11 24H2 中找回WordPad
  • 巴西總統盧拉見證美團簽署10億美元投資協議Keeta宣布進入巴西市場
  • 傳三星2nm良品率逐漸提高英偉達及高通都有下單意向
  • 2024全球晶片公司排行:NVIDIA居首英飛凌、義法半導體跌出前十
  • 蘋果今年將為台積電貢獻1兆新台幣營收
  • Manus回應開放註冊:海外用戶已取消等候名單國內產品尚未發布
  • 台積電美國三座新廠產能預訂一空蘋果、NVIDIA、AMD搶著要
  • 傳NVIDIA全球總部將設在台灣黃仁勳將於下周宣布選址
  • 無毒無污染:長六改火箭成功發射遙感四十號02組衛星
  • 日本研究稱手機毀了孩子腦:成績下滑發展停滯

投遞稿件

歡迎各界人士投遞稿件到admin@wongcw.com

請提供以下資料:

1.你的名字

2.你的電郵

3.分類目錄

4.文章標題

5.文章摘要

6.文章內容

7.文章來源

 

聯繫我們

查詢,投稿,商務合作:
​admin@wongcw.com
​技術支援:
​support@wongcw.com
​客户服務:
​cs@wongcw.com

QQ群:833641851

快帆

MALUS

極度掃描

DMCA.com Protection Status

WONGCW 網誌

  • 免責聲明
  • 捐助我們
  • ThemeNcode PDF Viewer
  • ThemeNcode PDF Viewer SC
  • Events

服務器提供

本站使用之服務器由ikoula提供。

聯繫我們

查詢,投稿,商務合作:
​admin@wongcw.com
​技術支援:
​support@wongcw.com
​客户服務:
​cs@wongcw.com

QQ群:833641851

© 2025   All Rights Reserved.
 

載入迴響中...