MYSQL共39篇
MySQL实现Oracle中的SYS_CONNECT_BY_PATH功能-Ddmit

MySQL实现Oracle中的SYS_CONNECT_BY_PATH功能

MySQL实现Oracle中的SYS_CONNECT_BY_PATH功能: 准备建表SQL DROP TABLE IF EXISTS `tb_dict_category_config`; CREATE TABLE `tb_dict_category_config` ( `id` varchar(100) DEFAULT NULL, `p...
ddmit的头像-DdmitDdmit6年前
034920
使用MYSQL实现Oracle的Start with…Connect By递归树查询-Ddmit

使用MYSQL实现Oracle的Start with…Connect By递归树查询

使用MYSQL实现Oracle的Start with...Connect By递归树查询: 准备建表SQL DROP TABLE IF EXISTS `tb_dict_category_config`; CREATE TABLE `tb_dict_category_config` ( `id` varchar(100) DEFA...
ddmit的头像-DdmitDdmit6年前
033030
mysql插入生僻字/表情符号Incorrect string value错误解决-Ddmit

mysql插入生僻字/表情符号Incorrect string value错误解决

环境信息 Windows 10; mysql 5.6; MariaDB 10.4; 错误信息 ### SQL: insert into author (ID, NAME, `DESC`, `TYPE`) values (?, ?, ?, ?) ### Cause: java.sql.SQLException: Incorrect str...
ddmit的头像-DdmitDdmit6年前
030690
MySQL decode()的等同实现-Ddmit

MySQL decode()的等同实现

MySQL decode()的等同实现: 在Oracle中使用decode方法可以轻松实现代码和值之间的转换,但是在MySQL中该如何实现类似功能呢? MySQL中没有直接的方法可以使用,但是我们可以通过下面两种方法来...
ddmit的头像-DdmitDdmit6年前
027630
CentOS忘记mariadb/mysql root密码解决办法-Ddmit

CentOS忘记mariadb/mysql root密码解决办法

这里有两种方式实现修改mariadb root密码。 mariadb版本:Server version: 10.3.10-MariaDB MariaDB Server 服务器:CentOS Linux release 7.5.1804 (Core) 方式1 1.查看mysql版本 mysql --vers...
ddmit的头像-DdmitDdmit4年前
025040
mysql远程连接提示错误2013-Ddmit

mysql远程连接提示错误2013

使用navicat进行远程连接mysql服务提示: ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0 我的环境: mysql所在服务器...
ddmit的头像-DdmitDdmit6年前
022130
mysql字符串连接函数使用注意事项-Ddmit

mysql字符串连接函数使用注意事项

使用Mysql字符串连接函数concat时应注意空值的情形: select CONCAT(null,'abc'); select CONCAT('abc',null); select CONCAT('abc',''); select CONCAT('','abc'); select CONCAT(IFNULL(NULL,...
ddmit的头像-DdmitDdmit6年前
020630
MySQL整型:INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT区别与表示范围-Ddmit

MySQL整型:INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT区别与表示范围

MySQL支持SQL标准整数类型INTEGER(或INT)和SMALLINT。 作为标准的扩展,MySQL还支持整型TINYINT,MEDIUMINT和BIGINT。 下表显示了每种整数类型所需的存储空间和范围。 以上说明摘自官方文档「...
ddmit的头像-DdmitDdmit6年前
020590
mysql数据库数据类型转换函数-Ddmit

mysql数据库数据类型转换函数

MySQL中实现IP地址转换为整数、整数转换为IP地址、十六进制转为十进制、十进制转为十六进制的函数整理如下: IP地址转换为整数 mysql> SELECT INET_ATON('172.21.10.31'); +----------------...
ddmit的头像-DdmitDdmit6年前
020460
MySQL启动报错:Plugin 'InnoDB' registration as a STORAGE ENGINE failed.-Ddmit

MySQL启动报错:Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

错误信息: winbert@winbert-debian:~$ sudo journalctl -xe Nov 05 13:49:51 winbert-debian mariadbd[1641]: 2021-11-05 13:49:51 0 [Note] InnoDB: Using Linux native AIO Nov 05 13:49:51 ...
ddmit的头像-DdmitDdmit4年前
019260