首页 > 数据库 >apt-get 安装 mysql

apt-get 安装 mysql

时间:2022-10-24 20:34:47浏览次数:42  
标签:... mips64el get 5.7 apt server mysql perl


apt-get 安装 mysql

root@node140:~# apt-get install mysql-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
fbterm imageworsener libc-ares2 libde265-0 libheif1 liblqr-1-0 libmaxminddb0 libqtermwidget5-0 libsbc1 libsmi2ldbl libspandsp2 libutf8proc2 libwireshark-data
libwireshark11 libwiretap8 libwscodecs2 libwsutil9 qtermwidget5-data squashfs-tools
使用'apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-6 libevent-extra-2.1-6 libfcgi-perl libhtml-template-perl libmecab2 mysql-client-5.7 mysql-client-core-5.7
mysql-server-5.7 mysql-server-core-5.7
建议安装:
libipc-sharedcache-perl mailx tinyca
下列【新】软件包将被安装:
libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-6 libevent-extra-2.1-6 libfcgi-perl libhtml-template-perl libmecab2 mysql-client-5.7 mysql-client-core-5.7
mysql-server mysql-server-5.7 mysql-server-core-5.7
升级了 0 个软件包,新安装了 12 个软件包,要卸载 0 个软件包,有 232 个软件包未被升级。
需要下载 20.6 MB 的归档。
解压缩后会消耗 178 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el mysql-client-core-5.7 mips64el 5.7.26-1 [6,777 kB]
获取:2 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el mysql-client-5.7 mips64el 5.7.26-1 [2,430 kB]
获取:3 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el mysql-server-core-5.7 mips64el 5.7.26-1 [7,370 kB]
获取:4 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libevent-core-2.1-6 mips64el 2.1.8-stable-4 [116 kB]
获取:5 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libevent-extra-2.1-6 mips64el 2.1.8-stable-4 [93.0 kB]
获取:6 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libmecab2 mips64el 0.996-6 [212 kB]
获取:7 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el mysql-server-5.7 mips64el 5.7.26-1 [3,239 kB]
获取:8 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libcgi-pm-perl all 4.40-1 [223 kB]
获取:9 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libfcgi-perl mips64el 0.78-2+b3 [36.7 kB]
获取:10 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libcgi-fast-perl all 1:2.13-1 [11.5 kB]
获取:11 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el libhtml-template-perl all 2.97-1 [66.1 kB]
获取:12 https://enterprise-packages.chinauos.com/server-enterprise fou/sp3/main mips64el mysql-server all 5.7.26-1 [11.2 kB]
已下载 20.6 MB,耗时 5秒 (4,327 kB/s)
正在预设定软件包 ...
正在选中未选择的软件包 mysql-client-core-5.7。
(正在读取数据库 ... 系统当前共安装有 180370 个文件和目录。)
准备解压 .../00-mysql-client-core-5.7_5.7.26-1_mips64el.deb ...
正在解压 mysql-client-core-5.7 (5.7.26-1) ...
正在选中未选择的软件包 mysql-client-5.7。
准备解压 .../01-mysql-client-5.7_5.7.26-1_mips64el.deb ...
正在解压 mysql-client-5.7 (5.7.26-1) ...
正在选中未选择的软件包 mysql-server-core-5.7。
准备解压 .../02-mysql-server-core-5.7_5.7.26-1_mips64el.deb ...
正在解压 mysql-server-core-5.7 (5.7.26-1) ...
正在选中未选择的软件包 libevent-core-2.1-6:mips64el。
准备解压 .../03-libevent-core-2.1-6_2.1.8-stable-4_mips64el.deb ...
正在解压 libevent-core-2.1-6:mips64el (2.1.8-stable-4) ...
正在选中未选择的软件包 libevent-extra-2.1-6:mips64el。
准备解压 .../04-libevent-extra-2.1-6_2.1.8-stable-4_mips64el.deb ...
正在解压 libevent-extra-2.1-6:mips64el (2.1.8-stable-4) ...
正在选中未选择的软件包 libmecab2:mips64el。
准备解压 .../05-libmecab2_0.996-6_mips64el.deb ...
正在解压 libmecab2:mips64el (0.996-6) ...
正在选中未选择的软件包 mysql-server-5.7。
准备解压 .../06-mysql-server-5.7_5.7.26-1_mips64el.deb ...
正在解压 mysql-server-5.7 (5.7.26-1) ...
正在选中未选择的软件包 libcgi-pm-perl。
准备解压 .../07-libcgi-pm-perl_4.40-1_all.deb ...
正在解压 libcgi-pm-perl (4.40-1) ...
正在选中未选择的软件包 libfcgi-perl。
准备解压 .../08-libfcgi-perl_0.78-2+b3_mips64el.deb ...
正在解压 libfcgi-perl (0.78-2+b3) ...
正在选中未选择的软件包 libcgi-fast-perl。
准备解压 .../09-libcgi-fast-perl_1%3a2.13-1_all.deb ...
正在解压 libcgi-fast-perl (1:2.13-1) ...
正在选中未选择的软件包 libhtml-template-perl。
准备解压 .../10-libhtml-template-perl_2.97-1_all.deb ...
正在解压 libhtml-template-perl (2.97-1) ...
正在选中未选择的软件包 mysql-server。
准备解压 .../11-mysql-server_5.7.26-1_all.deb ...
正在解压 mysql-server (5.7.26-1) ...
正在设置 libmecab2:mips64el (0.996-6) ...
正在设置 libcgi-pm-perl (4.40-1) ...
正在设置 mysql-server-core-5.7 (5.7.26-1) ...
正在设置 libhtml-template-perl (2.97-1) ...
正在设置 mysql-client-core-5.7 (5.7.26-1) ...
正在设置 libevent-core-2.1-6:mips64el (2.1.8-stable-4) ...
正在设置 libfcgi-perl (0.78-2+b3) ...
正在设置 libevent-extra-2.1-6:mips64el (2.1.8-stable-4) ...
正在设置 libcgi-fast-perl (1:2.13-1) ...
正在设置 mysql-client-5.7 (5.7.26-1) ...
正在设置 mysql-server-5.7 (5.7.26-1) ...
Renaming removed key_buffer and myisam-recover options (if present)
Please enable --log-error option or set appropriate redirections for standard output and/or standard error in daemon mode.
Warning: Unable to start the server.
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
正在设置 mysql-server (5.7.26-1) ...
正在处理用于 systemd (241.8-1+dde) 的触发器 ...
正在处理用于 man-db (2.8.5-2) 的触发器 ...
正在处理用于 libc-bin (2.28.10-1+dde) 的触发器 ...
## 安装过程中并没有提示root的密码,需要在该路径下查看root密码
root@node140:~# vim /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = Io7koNRVbKSFpLLK
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = Io7koNRVbKSFpLLK
socket = /var/run/mysqld/mysqld.sock
root@node140:~# sz /etc/mysql/debian.cnf
# 用上边的用户密码链接mysql
root@node140:~# mysql -u debian-sys-maint -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.26-1 (Uos)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> update mysql.user set authentication_string=PASSWORD('root') ,plugin='mysql_native_password' where user='root';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
### 上边报错的意思是: 你的密码不符合策略要求
### 那就查看当前的策略呗
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password_check_user_name | OFF |
| validate_password_dictionary_file | |
| validate_password_length | 8 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 1 |
| validate_password_policy | MEDIUM |
| validate_password_special_char_count | 1 |
+--------------------------------------+--------+
7 rows in set (0.01 sec)
### 那就修改密码的验证强度等级为LOW
mysql> set global validate_password_policy=LOW;
Query OK, 0 rows affected (0.00 sec)
### 设置全局密码参数长度为4
mysql> set global validate_password_length=4;
Query OK, 0 rows affected (0.01 sec)
### 修改 mysql 密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
Query OK, 0 rows affected (0.00 sec)

mysql>
## 解决 1130 - Host '10.17.13.200' is not allowed to connect to this MySQL server 错误
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select host from user where user='root';
+-----------+
| host |
+-----------+
| localhost |
+-----------+
1 row in set (0.00 sec)
## host= localhost 表示只能通过本机客户端去访问。
## 而设置host=%(是个通配符) 表示所有IP都有连接权限。
mysql> update user set host = '%' where user ='root';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
## 刷新配置,使配置立即生效
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql>

mysql 密码强度

There are three levels of password validation policy:

LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: root


标签:...,mips64el,get,5.7,apt,server,mysql,perl
From: https://blog.51cto.com/u_4981212/5791211

相关文章

  • 如何使用binlog2sql快速恢复Mysql误删除的数据
    文章目录​​前言​​​​......
  • day17 MySQL的安装 & 数据库基本语法——增删改查
    day17MySQL登录数据库mysql-hlocalhost-P3307-uroot-p查看所有数据库showdatabases;退出数据库exit;//现有表格usesitu;//使用哪个数据库createtable......
  • mysql的not in 优化
    有一个项目,mysql语句采用了notin,结果某些页面打开需要40多秒,排查sql语句后,发现是采用了notin语法导致全表扫描,消耗了大量的时间,飘易记录下优化的过程:项目简介:会议应......
  • mysql 联表更新某个字段
    想把i表中的数据通过关联关系,更新到m表中updateT_MuasmLEFTJOINT_Infoasionm.F_InfoId=i.F_Idsetm.F_InfoUuid=i.F_Uuid这里的join可以使用常见的......
  • MySQL中数据类型宽度
    一、数据类型的取值范围和宽度字段类型对应的取值范围:类型字节有符号取值范围无符号取值范围TINYINT1-128~1270~255SMALLINT2-32768~327670......
  • springboot整合elasticsearch实现MySQL模糊查询
    es关联mysql实现模糊查询的数据流:   1、使用logstash同步mysql数据到eslogstash简介及基本操作:https://blog.csdn.net/yurun_house/article/details/109025588win......
  • mysql事务和隔离级别学习--笔记
    一、MySQL事务1、什么事事务事务(transaction)就是一个最小的单独任务单元由一个或多个SQL语句组成,在这个任务单元中,每个SQL语句都是相互依赖,整个任务单元是作为一个不可分......
  • KYLIN(麒麟系统)下安装MySQL5.0
    1groupaddmysql2useradd-gmysqlmysql3#修改密码4passwdmysql5cd/usr/local6#解压文件7tar-zxvfmysql-standard-5.0.15-linux-i686.tar.gz8......
  • mysql InnoDB建表时设定初始大小的方法
    InnoDB在写密集的压力时,由于B-Tree扩展,因而也会带来数据文件的扩展,然而,InnoDB数据文件扩展需要使用mutex保护数据文件,这就会导致波动。丁奇的博客说明了这个问题:WhenInno......
  • Shell脚本中的while getopts用法,脚本中套用多个变量
    getpots是Shell命令行参数解析工具,旨在从ShellScript的命令行当中解析参数。getopts被Shell程序用来分析位置参数,option包含需要被识别的选项字符,如果这里的字符后面跟着......