数据库技术 – Lwxyz https://yun.lwxyz.cn Don't Forget To Be Awesome! Fri, 16 Jun 2023 22:20:57 +0000 zh-CN hourly 1 https://wordpress.org/?v=5.1.13 删除mysql服务 https://yun.lwxyz.cn/2018/06/19/%e5%88%a0%e9%99%a4mysql%e6%9c%8d%e5%8a%a1/ https://yun.lwxyz.cn/2018/06/19/%e5%88%a0%e9%99%a4mysql%e6%9c%8d%e5%8a%a1/#respond Tue, 19 Jun 2018 08:05:46 +0000 http://blog.450823756.xyz/?p=131 mysqld remove MySQL

]]>
https://yun.lwxyz.cn/2018/06/19/%e5%88%a0%e9%99%a4mysql%e6%9c%8d%e5%8a%a1/feed/ 0
JDBC链接MySQL8的注意事项 https://yun.lwxyz.cn/2018/06/19/jdbc%e9%93%be%e6%8e%a5mysql8%e7%9a%84%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9/ https://yun.lwxyz.cn/2018/06/19/jdbc%e9%93%be%e6%8e%a5mysql8%e7%9a%84%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9/#respond Tue, 19 Jun 2018 07:30:30 +0000 http://blog.450823756.xyz/?p=129 阅读更多]]> 转自:https://blog.csdn.net/woshixlhm/article/details/80540881

需要使用高版本的JDBC驱动,“mysql-connector-java 8”以上版本。

1. JDBC driver 由“com.mysql.jdbc.Driver”改为“com.mysql.cj.jdbc.Driver”。

2. JDBC url为:

jdbc:mysql://localhost/rs_report?userSSL=true&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT

3. 出现错误:“Establishing SSL connection withoutserver’s identity verification is not recommended. According to MySQL 5.5.45+,5.6.26+ and 5.7.6+ requirements SSL connection must be established by defaultif explicit option isn’t set. For compliance with existing applications notusing SSL the verifyServerCertificate property is set to ‘false’. You needeither to explicitly disable SSL by setting useSSL=false, or set useSSL=trueand provide truststore for server certificate verification.”

解决方案,在url中加上“userSSL=true”或“userSSL=false”。

4. 出现错误:“java.sql.SQLException: The server time zonevalue ‘???ú±ê×??±??’ is unrecognized or represents more than one time zone. Youmust configure either the server or JDBC driver (via the serverTimezoneconfiguration property) to use a more specifc time zone value if you want toutilize time zone support.”

解决方案,在url中加上“serverTimezone=GMT”。

]]>
https://yun.lwxyz.cn/2018/06/19/jdbc%e9%93%be%e6%8e%a5mysql8%e7%9a%84%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9/feed/ 0
mysql新建用户,并且授予权限 https://yun.lwxyz.cn/2018/06/19/mysql%e6%96%b0%e5%bb%ba%e7%94%a8%e6%88%b7%ef%bc%8c%e5%b9%b6%e4%b8%94%e6%8e%88%e4%ba%88%e6%9d%83%e9%99%90/ https://yun.lwxyz.cn/2018/06/19/mysql%e6%96%b0%e5%bb%ba%e7%94%a8%e6%88%b7%ef%bc%8c%e5%b9%b6%e4%b8%94%e6%8e%88%e4%ba%88%e6%9d%83%e9%99%90/#respond Tue, 19 Jun 2018 06:28:15 +0000 http://blog.450823756.xyz/?p=127 阅读更多]]> 1.创建新用户

create user ‘yueya’@’%’ identified by ‘YUEya*123456’;

2.授予权限

grant all privileges on *.* to ‘yueya’@’%’;

3.刷新权限

flush privileges;

]]>
https://yun.lwxyz.cn/2018/06/19/mysql%e6%96%b0%e5%bb%ba%e7%94%a8%e6%88%b7%ef%bc%8c%e5%b9%b6%e4%b8%94%e6%8e%88%e4%ba%88%e6%9d%83%e9%99%90/feed/ 0
如何在Oracle中查看各个表,表空间占用空间的大小 https://yun.lwxyz.cn/2018/06/01/%e5%a6%82%e4%bd%95%e5%9c%a8oracle%e4%b8%ad%e6%9f%a5%e7%9c%8b%e5%90%84%e4%b8%aa%e8%a1%a8%ef%bc%8c%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8d%a0%e7%94%a8%e7%a9%ba%e9%97%b4%e7%9a%84%e5%a4%a7%e5%b0%8f/ https://yun.lwxyz.cn/2018/06/01/%e5%a6%82%e4%bd%95%e5%9c%a8oracle%e4%b8%ad%e6%9f%a5%e7%9c%8b%e5%90%84%e4%b8%aa%e8%a1%a8%ef%bc%8c%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8d%a0%e7%94%a8%e7%a9%ba%e9%97%b4%e7%9a%84%e5%a4%a7%e5%b0%8f/#respond Fri, 01 Jun 2018 06:31:01 +0000 http://blog.450823756.xyz/?p=115 阅读更多]]> 一、查看表占用空间大小语句:

1
2
3
4
select t.segment_name, t.segment_type, sum(t.bytes / 1024 / 1024) "占用空间(M)"
from dba_segments t
where t.segment_type='TABLE'
group by OWNER, t.segment_name, t.segment_type;

 

二、查看表空间占用空间大小语句:

1
2
3
4
5
6
select a.tablespace_name,a.bytes/1024/1024 "Sum MB",(a.bytes-b.bytes)/1024/1024 "used MB",b.bytes/1024/1024 "free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a, 
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b 
where a.tablespace_name=b.tablespace_name 
order by ((a.bytes-b.bytes)/a.bytes) desc
]]>
https://yun.lwxyz.cn/2018/06/01/%e5%a6%82%e4%bd%95%e5%9c%a8oracle%e4%b8%ad%e6%9f%a5%e7%9c%8b%e5%90%84%e4%b8%aa%e8%a1%a8%ef%bc%8c%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8d%a0%e7%94%a8%e7%a9%ba%e9%97%b4%e7%9a%84%e5%a4%a7%e5%b0%8f/feed/ 0