树莓派 mysql 5.7_树莓派4B安装 mysql5.7.28

硬件:Raspberry Pi 4B(4g或8g版本)

系统:Ubuntu 20.04 LTS

下载相关deb文件

wget http://launchpadlibrarian.net/451652941/mysql-server_5.7.28-0ubuntu0.18.04.4_all.deb

wget http://launchpadlibrarian.net/451655612/mysql-server-5.7_5.7.28-0ubuntu0.18.04.4_arm64.deb

wget http://launchpadlibrarian.net/451655610/mysql-client-5.7_5.7.28-0ubuntu0.18.04.4_arm64.deb

wget http://launchpadlibrarian.net/353280751/mysql-common_5.8+1.0.4_all.deb

wget http://launchpadlibrarian.net/451655611/mysql-client-core-5.7_5.7.28-0ubuntu0.18.04.4_arm64.deb

wget http://launchpadlibrarian.net/451655613/mysql-server-core-5.7_5.7.28-0ubuntu0.18.04.4_arm64.deb

wget http://launchpadlibrarian.net/355861262/libevent-core-2.1-6_2.1.8-stable-4build1_arm64.deb

安装mysql

# 一般会报错,反复执行直到不报错为止

dpkg -i *.deb

# 默认服务

# systemctl list-units --all --type=service|grep mysql

mysql.service loaded active running MySQL Community Server

# 配置文件

root@ubuntu:~/mysql# cat /etc/mysql/my.cnf

#

# The MySQL database server configuration file.

#

# You can copy this to one of:

# - "/etc/mysql/my.cnf" to set global options,

# - "~/.my.cnf" to set user-specific options.

#

# One can use all long options that the program supports.

# Run program with --help to get a list of available options and with

# --print-defaults to see which it would actually understand and use.

#

# For explanations see

# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#

# * IMPORTANT: Additional settings that can override those from this file!

# The files must end with '.cnf', otherwise they'll be ignored.

#

!includedir /etc/mysql/conf.d/

!includedir /etc/mysql/mysql.conf.d/

root@ubuntu:~/mysql# cat /etc/mysql/my.cnf

#

# The MySQL database server configuration file.

#

# You can copy this to one of:

# - "/etc/mysql/my.cnf" to set global options,

# - "~/.my.cnf" to set user-specific options.

#

# One can use all long options that the program supports.

# Run program with --help to get a list of available options and with

# --print-defaults to see which it would actually understand and use.

#

# For explanations see

# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#

# * IMPORTANT: Additional settings that can override those from this file!

# The files must end with '.cnf', otherwise they'll be ignored.

#

!includedir /etc/mysql/conf.d/

!includedir /etc/mysql/mysql.conf.d/

访问mysql

# mysql的root用户密码默认为空

mysql -uroot -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.7.28-0ubuntu0.18.04.4 (Ubuntu)

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> status;

--------------

mysql Ver 14.14 Distrib 5.7.28, for Linux (aarch64) using EditLine wrapper

Connection id:2

Current database:

Current user:root@localhost

SSL:Not in use

Current pager:stdout

Using outfile:''

Using delimiter:;

Server version:5.7.28-0ubuntu0.18.04.4 (Ubuntu)

Protocol version:10

Connection:Localhost via UNIX socket

Server characterset:latin1

Db characterset:latin1

Client characterset:utf8

Conn. characterset:utf8

UNIX socket:/var/run/mysqld/mysqld.sock

Uptime:5 min 13 sec

Threads: 1 Questions: 5 Slow queries: 0 Opens: 105 Flush tables: 1 Open tables: 98 Queries per second avg: 0.015

参考

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值