通常我们在一些场景下会用到一个字符串是否包含某种特定字符,比如判断密码是否只包含数字,检查url是否有不规范字符,删除多余空格等操作 CharacterSet简单描述 ---- CharacterSet...下面是简单分组总结: 属性 描述 CharacterSet.alphanumerics 字母和数字的组合,包含大小写, 不包含小数点 CharacterSet.capitalizedLetters 字母...,首字母大写,Lt类别 CharacterSet.decimalDigits 0-9的数字,也不包含小数点 CharacterSet.whitespaces 空格 CharacterSet.whitespacesAndNewlines...空格和换行 CharacterSet.letters 所有英文字母,包含大小写 65-90 97-122 CharacterSet.lowercaseLetters 小写英文字母 97-122 CharacterSet.uppercaseLetters...大写英文字母 65-90 CharacterSet.nonBaseCharacters 非基础字符 M* CharacterSet.illegalCharacters 不合规字符,没有在Unicode
GPL), Release 21, Revision 2a37e4e Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: utf8 Db characterset: utf8 Client characterset: utf8 Conn....characterset: utf8 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 26 min 14 sec Threads: 1 Questions...: utf8Db characterset: utf8Client characterset: utf8Conn. ...characterset: utf8UNIX socket: /var/lib/mysql/mysql.sockUptime: 26 min 14 sec Threads: 1 Questions
MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: latin1 Db characterset: latin1 Client characterset: utf8 Conn....characterset: utf8 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 2 min...: latin1 Db characterset: latin1 Client characterset: gbk Conn....characterset: gbk TCP port: 3307 Uptime: 4 hours 9 min 29 sec Threads
Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset...: latin1 Db characterset: latin1 Client characterset: gbk Conn....characterset: gbk TCP port: 3307 Uptime: 4 hours 7 min 11 sec Threads...: latin1 Db characterset: latin1 Client characterset: gbk Conn....characterset: gbk TCP port: 3307 Uptime: 4 hours 9 min 29 sec Threads
一、使用命令行模式进入mysql会看到最开始的提示符; 查看版本信息 #1使用命令行模式进入mysql会看到最开始的提示符 Your MySQL connection id is 3 Server...5.1.69 Source distribution Protocol version:10 Connection: Localhost via UNIX socket Server characterset...:utf8 Db characterset:utf8 Client characterset:utf8 Conn. characterset:utf8 UNIX socket:...GPL), Release 5, Revision a2f663a Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /var
Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: latin1 Db characterset: latin1 Client characterset: latin1 Conn. ...characterset: latin1 UNIX socket: /tmp/mysql.sock Uptime: 2...: latin1 Db characterset: latin1 Client characterset: latin1 Conn. ...characterset: latin1 UNIX socket: /tmp/mysql5.sock Uptime:
查看所有数据库 show databases; 切换数据库 # 切换到student数据库 use student; 查看当前数据库 select database(); 或 通过show tables查看 mysql...| employee | | student | +-----------------+ 8 rows in set (0.04 sec) 或 通过status查看 mysql...> status; -------------- mysql Ver 8.0.18 for osx10.15 on x86_64 (Homebrew) Connection id: 12...: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn....characterset: utf8mb4 UNIX socket: /tmp/mysql.sock Uptime: 4 days 20 hours 19 min
ClickHouse 这点不错,支持MySQL wire通讯协议,用 mysql 命令行直接连 ClickHouse 服务器,用起来跟 MySQL 几乎一样。...mysql 命令行客户端版本:8.0.16 ClickHouse 服务器版本:24.1.8.22 不需要任何配置,只要网通,用 mysql 使用缺省的 9004 端口连接 ClickHouse 实例的...Server version: 24.1.8.22-ClickHouse Protocol version: 10 Connection: 172.18.4.126 via TCP/IP Server characterset...: 0 Db characterset: 0 Client characterset: 0 Conn....characterset: 0 TCP port: 9004 -------------- -------------- select version() -------------- +----
关于mysql的端口号 先登录mysql: fegy@fegy-X542UN:~$ mysql -u root -p Enter password: Welcome to the MySQL monitor...socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted...5.7.26-0ubuntu0.18.04.1 (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: 3 hours 10 min 3 sec Threads:
8.0.28 Connection: 127.0.0.1 via TCP/IP TCP port: 3350 Server characterset...: utf8mb4 Schema characterset: utf8mb4 Client characterset: utf8mb4 Conn....characterset: utf8mb4 Result characterset: utf8mb4 Compression: Disabled...: utf8mb4 Schema characterset: utf8mb4 Client characterset: utf8mb4 Conn....characterset: utf8mb4 Result characterset: utf8mb4 Compression: Disabled
我这里的MySQL是8.0.x版本 [test]> \s -------------- mysql Ver 8.0.36-28 for Linux on x86_64 (Percona Server...Revision 47601f19 Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn....characterset: utf8mb4 UNIX socket: /data/mysql/mysql.sock Uptime: 6 hours
[root@localhost ~]# mysql -uroot -p -P 3306 -h 127.0.0.1 mysql: [Warning] Using a password on the command...Type '\c' to clear the current input statement. mysql> status -------------- mysql Ver 14.14 Distrib...5.7.26-29-log Percona Server (GPL) Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Server characterset...: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8 Conn. ...characterset: utf8 TCP port: 3306 Uptime: 39 days 8 hours 53 min 39 sec Threads: 4
但是,如果我们用的是Percona分支的MySQL,这件事就变得简单多了。...Percona MySQL 下,我们可以打开userstat参数,通过查询系统统计表来获取用户、客户端和库表访问情况,注意:该功能只在MySQL的 Percona 发行版有效,社区版不带这个功能。... Release 83.0, Revision dc97471bd40 Protocol version:10 Connection:Localhost via UNIX socket Server characterset...:utf8 Db characterset:utf8 Client characterset:utf8 Conn. ...characterset:utf8 UNIX socket:/tmp/mysql.sock Uptime:110 days 8 hours 34 min 25 sec Threads: 32 Questions
=================搭建环境 一、数据库 //命令行进入数据库 mysql -uroot -p //创建数据库,并指定编码 mysql> create database itcastoa0720...default character set utf8; Query OK, 1 row affected (0.21 sec) //查询创建的数据库 mysql> show create database...Edition (Commercial) Protocol version: 10 Connection: localhost via TCP/IP Server characterset...: utf8 Db characterset: utf8 Client characterset: gbk Conn....characterset: gbk TCP port: 3306 Uptime: 2 hours 5 min 35 sec Threads
Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: latin1 Db characterset: utf8 Client characterset: latin1 Conn....characterset: latin1 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 3 hours...: latin1 Db characterset: utf8 Client characterset: gbk ---客户端和conn端字符集都变成gbk了。...characterset: gbk UNIX socket: /var/lib/mysql/mysql.sock Uptime: 3 hours
,足以看到MySQL的格局,它是把很多能做不能做得都揽过来自己做了。...wget https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-1.0.9-linux-glibc2.12-x86-64bit.tar.gz...如果查看MySQL服务的状态,就是一个很简单的status mysql-js> \status MySQL Shell Version 1.0.9 Session type:...5.7.17-log Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Server characterset...: latin1 Schema characterset: latin1 Client characterset: latin1 Conn. characterset
: latin1 Db characterset: latin1 Client characterset: latin1 Conn....characterset: latin1 UNIX socket: /var/run/mysqld/mysqld.sock Uptime: 128 days 13 hours 4 min 59 sec...: latin1 Db characterset: latin1 Client characterset: utf8 Conn....: utf8 Db characterset: utf8 Client characterset: utf8 Conn....: latin1 Db characterset: utf8 Client characterset: utf8 Conn.
\MySQL Server 5.7\bin下 运行cmd窗口 mysql -uroot -p 输入密码 然后status D:\MySQL\MySQL Server 5.7\bin>mysql -uroot...Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset...: utf8 Db characterset: utf8 Client characterset: utf8 Conn....characterset: utf8 TCP port: 3306 Uptime: 10 min 17 sec Threads: 1...> 最终显示utf8 MySQL调试完毕 导入数据库 常用source 命令 进入mysql数据库控制台 如 mysql -uroot -p show databases; mysql>use
MySQL刷新权限,将某些权限从硬盘刷新到内存中(修改root密码自带隐式刷新权限操作) mysql> flush privileges; Query OK, 0 rows affected (0.00...sec) mysql> 查看服务端口 mysql> show variables like 'port'; +---------------+-------+ | Variable_name |...Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset...: latin1 Db characterset: latin1 Client characterset: utf8 Conn....characterset: utf8 UNIX socket: /tmp/mysql.sock Uptime: 2 days 16 hours
MySql版本信息的查询: 1、通过mysql -V命令查询 C:/mysql/bin>mysql -V mysql Ver 12.22 Distrib 4.0.18, for Win95/Win98...(i32) 2、通过mysql模式下的status命令查看状态 mysql> status -------------- mysql Ver 12.22 Distrib 4.0.18, for Win95...version: 4.0.18-nt Protocol version: 10 Connection: localhost via TCP/IP Client characterset...: latin1 Server characterset: latin1 TCP port: 3306 Uptime: 19 hours...-nt | +-----------+ 1 row in set (0.00 sec) mysql> 4、通过mysql --help命令进行查看 C:/mysql/bin>mysql --help mysql
领取专属 10元无门槛券
手把手带您无忧上云