当前位置: 首页 > news >正文

当你在Linux系统中使用MySQL命令行工具查询数据库时,如果中文显示为问号(?)或其他乱码,简单解决办法。(2)

文章目录

  • 1、问题出现
  • 2、解决办法

1、问题出现

在这里插入图片描述

2、解决办法

mysql -u [username] -p --default-character-set=utf8 [database_name]
root@ab66508d9441:/# mysql -uroot -p123456 --default-character-set=utf8 tingshu_album
mysql: [Warning] Using a password on the command line interface can be insecure.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 80
Server version: 8.0.27 MySQL Community Server - GPLCopyright (c) 2000, 2021, Oracle and/or its affiliates.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> select * from base_attribute;
+----+--------------+-----------------+---------------------+---------------------+------------+
| id | category1_id | attribute_name  | create_time         | update_time         | is_deleted |
+----+--------------+-----------------+---------------------+---------------------+------------+
|  1 |            2 | 有声书分类      | 2023-03-20 15:39:12 | 2023-03-20 15:39:12 |          0 |
|  2 |            2 | 播讲形式        | 2023-03-20 15:39:12 | 2023-03-20 15:39:12 |          0 |
|  3 |            2 | 是否付费        | 2023-03-20 15:39:12 | 2023-03-20 15:39:12 |          0 |
|  4 |            2 | 是否完本        | 2023-03-20 15:39:12 | 2023-03-20 15:39:12 |          0 |
|  5 |            2 | 是否新品        | 2023-03-20 15:39:12 | 2023-03-20 15:39:12 |          0 |
|  6 |           10 | 是否付费        | 2023-03-20 15:53:23 | 2023-03-20 15:53:23 |          0 |
|  7 |           10 | 是否完本        | 2023-03-20 15:53:23 | 2023-03-20 15:53:23 |          0 |
|  8 |           11 | 是否付费        | 2023-03-20 15:53:23 | 2023-03-20 15:58:02 |          0 |
|  9 |           11 | 是否完本        | 2023-03-20 15:58:02 | 2023-03-20 15:58:02 |          0 |
| 10 |            8 | 创作团体        | 2023-03-20 15:58:02 | 2023-03-20 15:58:02 |          0 |
| 11 |            8 | 是否付费        | 2023-03-20 15:58:02 | 2023-03-20 15:58:02 |          0 |
| 12 |            8 | 是否完结        | 2023-03-20 15:58:02 | 2023-03-20 15:58:02 |          0 |
| 13 |            6 | 是否付费        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 14 |            6 | 是否完结        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 15 |            5 | 适合年龄        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 16 |            5 | 是否完结        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 17 |            5 | 是否付费        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 18 |           12 | 是否付费        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
| 19 |           12 | 是否完结        | 2023-03-20 16:04:13 | 2023-03-20 16:04:13 |          0 |
+----+--------------+-----------------+---------------------+---------------------+------------+
19 rows in set (0.00 sec)
http://www.lryc.cn/news/443880.html

相关文章:

  • API网关之Fizz Gateway
  • pgvector docker版安装;稀疏向量使用;psycopg2 python连接使用
  • C#命令行参数解析库System.CommandLine介绍
  • CCF CSP题解:密码(key)(202409-1)
  • RuntimeError: Maximum Recursion Depth Exceeded - 递归深度超限的完美解决方案
  • Linux1-ls,cd,pwd
  • 【高级编程】XML DOM4J解析XML文件(含案例)
  • 查看VSFTPD配置的服务器路径和linux系统有哪些用户
  • JavaEE: 创造无限连接——网络编程中的套接字
  • 记K8s组件harbor和kuboard故障恢复
  • c++ return {};
  • 【设计模式-适配】
  • 深度学习02-pytorch-08-自动微分模块
  • 使用Python实现深度学习模型:智能宠物监控与管理
  • 【HTTPS】对称加密和非对称加密
  • MySQL中的LIMIT与ORDER BY关键字详解
  • Java 编码系列:集合框架(List、Set、Map 及其常用实现类)
  • Go进阶概览 -【7.2 泛型的使用与实现分析】
  • 罗德岛战记游戏源码(客户端+服务端+数据库+全套源码)游戏大小9.41G
  • AI+教育|拥抱AI智能科技,让课堂更生动高效
  • WebServer
  • java项目之基于spring boot的多维分类的知识管理系统的设计与实现源码
  • go的结构体、方法、接口
  • 力扣第一题——删除有序数组中的重复项
  • Tuxera NTFS for Mac 2023绿色版
  • LeetCode[中等] 155. 最小栈
  • Python青少年简明教程目录
  • Revit学习记录-版本2018【持续补充】
  • 深度学习01-概述
  • leetcode232. 用栈实现队列