首页
统计
留言板
直播
更多
壁纸
推荐
Git仓库
Search
1
IntelliJ IDEA激活 - 至2022年10月 (持续更新)
645 阅读
2
GitLab企业版搭建(附生成证书)
626 阅读
3
淘宝 京东秒杀脚本
422 阅读
4
Groovy模板引擎 API 构建动态脚本
324 阅读
5
欢迎使用 Typecho
294 阅读
杂货间
开发
Java
JavaScript
Android
JQuery
MySQL
PHP
Groovy
Git
运维
CentOS
Red Heat
Ubuntu
Debian
运行环境
登录
/
注册
Search
标签搜索
开发
Java
Android
MySQL8
CentOS
CentOS8
Linux
Git
Swing
JavaScript
JQuery
MySQL
临时手机号
IDEA
Steam
YouTube
订阅
激活码
GitLab
nginx
Dotdotmaples
累计撰写
30
篇文章
累计收到
7
条评论
首页
栏目
杂货间
开发
Java
JavaScript
Android
JQuery
MySQL
PHP
Groovy
Git
运维
CentOS
Red Heat
Ubuntu
Debian
运行环境
页面
统计
留言板
直播
壁纸
推荐
Git仓库
搜索到
2
篇与
MySQL
的结果
MySQL8与Java类型对照表
MySQL和Java数据类型之间的可能转换These MySQL Data TypesCan always be converted to these Java typesCHAR, VARCHAR, BLOB, TEXT, ENUM, and SETjava.lang.String, java.io.InputStream, java.io.Reader, java.sql.Blob, java.sql.ClobFLOAT, REAL, DOUBLE PRECISION, NUMERIC, DECIMAL, TINYINT, SMALLINT, MEDIUMINT, INTEGER, BIGINTjava.lang.String, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Double, java.math.BigDecimalDATE, TIME, DATETIME, TIMESTAMPjava.lang.String, java.sql.Date, java.sql.TimestampResultSet.getObject()方法使用MySQL和Java类型之间的类型转换,并在适当时遵循JDBC规范。ResultSetMetaData.GetColumnTypeName()和 返回的值 ResultSetMetaData.GetColumnClassName() 如下表所示.有关JDBC类型的更多信息,请参见 java.sql.Types类上的参考 。ResultSetMetaData.GetColumnTypeName() 和 ResultSetMetaData.GetColumnClassName() 的MySQL类型和返回值MySQL Type NameReturn value of GetColumnTypeNameReturn value of GetColumnClassNameBIT(1)BITjava.lang.BooleanBIT( > 1)BITbyte[]TINYINTTINYINTjava.lang.Boolean if the configuration property tinyInt1isBit is set to true (the default) and the storage size is 1, or java.lang.Integer if not.BOOL, BOOLEANTINYINTSee TINYINT, above as these are aliases for TINYINT(1), currently.SMALLINT[(M)] [UNSIGNED]SMALLINT [UNSIGNED]java.lang.Integer (regardless of whether it is UNSIGNED or not)MEDIUMINT[(M)] [UNSIGNED]MEDIUMINT [UNSIGNED]java.lang.Integer (regardless of whether it is UNSIGNED or not)INT,INTEGER[(M)] [UNSIGNED]INTEGER [UNSIGNED]java.lang.Integer, if UNSIGNED java.lang.LongBIGINT[(M)] [UNSIGNED]BIGINT [UNSIGNED]java.lang.Long, if UNSIGNED java.math.BigIntegerFLOAT[(M,D)]FLOATjava.lang.FloatDOUBLE[(M,B)]DOUBLEjava.lang.DoubleDECIMAL[(M[,D])]DECIMALjava.math.BigDecimalDATEDATEjava.sql.DateDATETIMEDATETIMEjava.sql.TimestampTIMESTAMP[(M)]TIMESTAMPjava.sql.TimestampTIMETIMEjava.sql.Time`YEAR[(24)]`YEARIf yearIsDateType configuration property is set to false, then the returned object type is java.sql.Short. If set to true (the default), then the returned object is of type java.sql.Date with the date set to January 1st, at midnight.CHAR(M)CHARjava.lang.String (unless the character set for the column is BINARY, then byte[] is returned.VARCHAR(M) [BINARY]VARCHARjava.lang.String (unless the character set for the column is BINARY, then byte[] is returned.BINARY(M)BINARYbyte[]VARBINARY(M)VARBINARYbyte[]TINYBLOBTINYBLOBbyte[]TINYTEXTVARCHARjava.lang.StringBLOBBLOBbyte[]TEXTVARCHARjava.lang.StringMEDIUMBLOBMEDIUMBLOBbyte[]MEDIUMTEXTVARCHARjava.lang.StringLONGBLOBLONGBLOBbyte[]LONGTEXTVARCHARjava.lang.StringENUM('value1','value2',...)CHARjava.lang.StringSET('value1','value2',...)CHARjava.lang.Stringjava.sql.TypesModifier and TypeField and Descriptionstatic intARRAYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.static intBIGINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.static intBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.static intBITThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.static intBLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.static intBOOLEANThe constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN.static intCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.static intCLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.static intDATALINKThe constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK.static intDATEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.static intDECIMALThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.static intDISTINCTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.static intDOUBLEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.static intFLOATThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.static intINTEGERThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.static intJAVA_OBJECTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.static intLONGNVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGNVARCHAR.static intLONGVARBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.static intLONGVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.static intNCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCHARstatic intNCLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCLOB.static intNULLThe constant in the Java programming language that identifies the generic SQL value NULL.static intNUMERICThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.static intNVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NVARCHAR.static intOTHERThe constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.static intREALThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.static intREFThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.static intREF_CURSORThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF CURSOR.static intROWIDThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ROWIDstatic intSMALLINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.static intSQLXMLThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type XML.static intSTRUCTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.static intTIMEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.static intTIME_WITH_TIMEZONEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME WITH TIMEZONE.static intTIMESTAMPThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.static intTIMESTAMP_WITH_TIMEZONEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP WITH TIMEZONE.static intTINYINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.static intVARBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.static intVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.
2020年04月16日
138 阅读
0 评论
0 点赞
CentOS8在线安装MySQL8
清理环境1.检查是否安装了MySQLrpm -qa | grep mysql ## 卸载已经安装的MySQL yum remove mysql-xxx-xxx ## 检查并删除MySQL的配置文件 find / -name mysql rm -rf xxxxxxxxxx2. 删除MariaDB的文件rpm -pa | grep mariadb ## 可能出现 mariadb-libs-5.5.56-2.el7.x86_64 yum -y remove mariadb-libs.x86_64安装MySQL1.下载 MySQL源前往官方网站复制yum源链接,CentOS8是属于Red Hat再编译版本,所以选择Red Hat Enterprise Linux 8 / Oracle Linux 8 (Architecture Independent), RPM Package 点击Download按钮进入如下界面## 鼠标放在这个 No thanks, just start my download.上 鼠标右键 --> 复制链接地址(wget + 复制的链接地址进行下载) wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm ## 安装MySQL源 rpm -ivh mysql80-community-release-el8-1.noarch.rpm ## 卸载使用 rpm -Uvh mysql80-community-release-el8-1.noarch2.安装yum -y install mysql-server ## 注意:这里的MySQL8不是mysql-community-server ## 启动MySQL systemctl start mysqld ## 重启MySQL systemctl restart mysqld ## 停止MySQL systemctl stop mysqld 默认配置文件路径: 配置文件:/etc/my.cnf 日志文件:/var/log/var/log/mysqld.log 服务启动脚本:/usr/lib/systemd/system/mysqld.service socket文件:/var/run/mysqld/mysqld.pid登陆并配置MySQL1.登陆mysql -u root ## 第一次登陆没有密码,如果需要密码可以使用下面的命令查询初始密码 cat /var/log/mysqld.log | grep password2.配置-- 设置Root密码 alter user 'root'@'localhost' identified by 'mysql123456'; -- 切换到MySQL库 use mysql; -- 设置登陆权限 update user set Host = '%' where User = 'root'; -- 要想设置简单密码要先修改安全等级 MySQL8的修改命令如下 -- 用于控制validate_password的验证策略 0 --> low 1 --> MEDIUM 2 --> strong set global validate_password.policy = 0; -- 密码长度的最小值 set global validate_password.length = 1; -- 大小写的最小个数 set global validate_password.mixed_case_count = 2; -- 总之8的密码策略就是将validate_password后的‘_’变成‘.’
2019年11月07日
46 阅读
0 评论
0 点赞