Ubungu 18.04安装MySQL 5.7.24
Ubuntu 18.04,mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64),
USERNAME@USERNAME-VirtualBox:~$ sudo apt-get install -y mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libevent-core-2.1-6 libhtml-template-perl mysql-client-5.7
mysql-client-core-5.7 mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
libaio1 libevent-core-2.1-6 libhtml-template-perl mysql-client mysql-client-5.7
mysql-client-core-5.7 mysql-server mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 9 newly installed, 0 to remove and 204 not upgraded.
Need to get 20.4 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libaio1 amd64 0.3.110-5 [6,448 B]
Get:2 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-core-5.7 amd64 5.7.24-0ubuntu0.18.04.1 [6,988 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-5.7 amd64 5.7.24-0ubuntu0.18.04.1 [2,312 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-core-5.7 amd64 5.7.24-0ubuntu0.18.04.1 [7,777 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-5.7 amd64 5.7.24-0ubuntu0.18.04.1 [3,193 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client all 5.7.24-0ubuntu0.18.04.1 [9,828 B]
Get:9 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server all 5.7.24-0ubuntu0.18.04.1 [9,948 B]
Fetched 20.4 MB in 8s (2,540 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libaio1:amd64.
(Reading database ... 156461 files and directories currently installed.)
Preparing to unpack .../0-libaio1_0.3.110-5_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-5) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../1-mysql-client-core-5.7_5.7.24-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../2-mysql-client-5.7_5.7.24-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../3-mysql-server-core-5.7_5.7.24-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Selecting previously unselected package libevent-core-2.1-6:amd64.
Preparing to unpack .../4-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../5-mysql-server-5.7_5.7.24-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../6-libhtml-template-perl_2.97-1_all.deb ...
Unpacking libhtml-template-perl (2.97-1) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../7-mysql-client_5.7.24-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-client (5.7.24-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../8-mysql-server_5.7.24-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.24-0ubuntu0.18.04.1) ...
Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Setting up libhtml-template-perl (2.97-1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libaio1:amd64 (0.3.110-5) ...
Processing triggers for systemd (237-3ubuntu10.9) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up mysql-client-core-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Setting up mysql-server-core-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.24-0ubuntu0.18.04.1) ...
Setting up mysql-client (5.7.24-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.24-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (5.7.24-0ubuntu0.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.9) ...
Processing triggers for ureadahead (0.100.0-20) ...
USERNAME@USERNAME-VirtualBox:~$ mysql -uroot -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
USERNAME@USERNAME-VirtualBox:~$ mysql -uroot -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Ubuntu上 MySQL安装后,无法访问服务器,
USERNAME@USERNAME-VirtualBox:~$ whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /etc/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
参考:
ubuntu18.04 安装mysql不出现设置 root 帐户的密码问题
https://blog.csdn.net/NeptuneClouds/article/details/80995759
update mysql.user set authentication_string=password('password') where user='root'and Host = 'localhost';
更改root账号密码:
mysql> select host,user from mysql.user;
+-----------+------------------+
| host | user |
+-----------+------------------+
| localhost | debian-sys-maint |
| localhost | mysql.session |
| localhost | mysql.sys |
| localhost | root |
+-----------+------------------+
4 rows in set (0.00 sec)
mysql>
mysql> update mysql.user set authentication_string=password("") where user = 'root' and host = 'localhost';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> update mysql.user set authentication_string=password("111111") where user = 'root' and host = 'localhost';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
更改root账号的plugin:为什么?更改后可以不需要添加sudo即可使用mysql登录,
mysql> select user,host,authentication_string,plugin from user where user = 'root';
+------+-----------+-------------------------------------------+-------------+
| user | host | authentication_string | plugin |
+------+-----------+-------------------------------------------+-------------+
| root | localhost | *FD571203974BA9AFE270FE62151AE967ECA5E0AA | auth_socket |
+------+-----------+-------------------------------------------+-------------+
1 row in set (0.00 sec)
mysql> update user set plugin='mysql_native_password' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Ubungu 18.04安装MySQL 5.7.24的更多相关文章
- Ubuntu 18.04 安装MySQL
最近在写东西的时候,需要用到MySQL,在网上查了一下,都说Ubuntu18.04不能安装MySQL5.7.22, 总觉的不可能,所以自己就研究了一下,然后分享给大家 工具/原料 VMware W ...
- 在Ubuntu 18.04 安装 MySQL 8.0
在Ubuntu 18.04 安装 MySQL 8.0 ① 登入 mysql 官网,在官网中下载 deb 包,点击该链接,即可下载. https://dev.mysql.com/downloads/re ...
- Ubuntu 18.04安装MySQL指南
前言 Ubuntu18.04想要安装MySQL,只能安装MySQL8.0版本.如果你直接 apt-get install mysql-server 安装,那么恭喜踩坑! 先给出彻底删除mysql5.x ...
- ubuntu 18.04 安装mysql 8.0
1.下载配置(不然直接装的是mysql5.7): wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb 2.更新配置: sudo ...
- Ubuntu 18.04安装MySQL
安装 MySQL 服务端 sudo apt-get install mysql-server 等待安装完成. 检查 mysql 服务状态 servive mysql status 登录 mysql 客 ...
- ubuntu 18.04 安装mysql 遇到语言格式不兼容性问题解决
安装mysql的时候,遇到了这样一个错误:perl: warning: Setting locale failed. perl: warning: Please check that your loc ...
- 关于乌班图18.04安装mysql不提示设置密码解决方案
1.下载安装mysql sudo apt-get update sudo apt-get install -y mysql-server mysql-client //下载mysql 运行mysql时 ...
- ubuntu 18.04安装mysql 8
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb sudo dpkg -i mysql-apt-config_0. ...
- Ubuntu 18.04 安装配置 MySQL 5.7
Ubuntu 18.04 安装 mysql 的过程中,竟然没有让你输入秘密?!(之前在 Ubuntu 14.04 下,安装过程中会询问密码),这导致安装完 mysql 初始秘密不知道的问题. $ su ...
随机推荐
- AS3.0:给图片添加滤镜模糊与斜角效果
滤镜可应用于任何显示对象(即,从 DisplayObject 类继承的对象), 例如 MovieClip.SimpleButton.TextField 和 Video 对象,以及 BitmapData ...
- Yosimite10.10(Mac os)安装c/c++内存检测工具valgrind
1.下载支持包m4-1.4.13.tar.gz $ curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz 2. 解压m4-1.4.13.t ...
- vue2.0 之文本渲染-v-html、v-text
vue2.0 之文本渲染-v-html.v-text 1.index.html代码 <!DOCTYPE html> <html> <head> <meta c ...
- search 重要文件路径 搜索【原】
hosts文件路径 C:/WINDOWS/system32/drivers/etc/ tnsnames.ora文件路径 C:/oraclexe/app/oracle/product/11.2.0/se ...
- 【DS】排序算法的稳定性
主要的排序算法有八种:直接插入排序,希尔排序(这两种统称为插入排序),冒泡排序,快速排序(这两种统称为交换排序),直接选择排序,堆排序(这两种统称为选择排序),归并排序,基数排序.今天我们就讨论一下它 ...
- Gym - 100851F - Froggy Ford(dijkstra)
题目链接 参考 http://blog.csdn.net/KIJamesQi/article/details/52214990 题意 蛤蛤要从这岸去到对岸,河中有n块石头,现可以在河中添加一块石头 ...
- 改变placeholder的字体颜色大小
input::-webkit-input-placeholder { /* WebKit browsers */ font-size:14px; color: #333; } input::-moz- ...
- JAVA求解全排列
一,问题描述 给定一个字符串,求出该字符串的全排列. 比如:"abc"的全排列是:abc.acb.bac.bca.cab.cba 二,实现思路 采用递归的方式求解.每次先选定一个字 ...
- 散列之HashTable学习
1,什么是散列? 举个例子,在日常生活中,你将日常用品都放在固定的位置,当你下次需要该东西时,直接去该地方取它.这个过程就相当于散列查找. 若将它们随意杂乱无章地存放,当需要某件东西时,只能一个地方一 ...
- 序列化时提示There was an error reflecting type 'System.Collections.Generic.List`1
序列化xml文件到List中,非win10下出现了这个错误,但是在win10下正常.经过仔细的研究,发现是序列化工具类不能使用Static.去掉Static即可.