
mysql
Joy CR
欢迎关注我的公众号: 小秋的博客
https://blog.youkuaiyun.com/xiaoqiu_cr
https://github.com/crr121
https://segmentfault.com/u/chenrong_flying
联系邮箱:rongchen633@gmail.com
展开
-
MySQL存储过程以及Java调用ca'llablestatment
1、创建存储过程SQL语句#创建存储过程create procedure mysql_add(in x1 int,in x2 int , out y int) begin set y := x1 + x2; end#调用存储过程call mysql_add(2,3,@y)#查询结果select @y;#查询所有的存储过程show procedure status;1.1、J...原创 2018-03-06 17:09:06 · 151 阅读 · 0 评论 -
beeline执行insert命令时报错Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":xiao
0: jdbc:hive2://localhost:10000/cr> insert into student values(4,'sunny');WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different ...原创 2018-08-19 11:25:37 · 3813 阅读 · 1 评论 -
hive初始化元数据 Access denied for user 'xiaoqiu'@'%' to database 'hive_metastore'
[xiaoqiu@s150 /soft/hive/conf]$ schematool -initSchema -dbType mysqlSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/soft/apache-hive-2.3.3-bin/lib/log4j-slf4j-...原创 2018-08-19 11:24:53 · 1984 阅读 · 2 评论 -
ERROR 1133 (42000): Can't find any matching row in the user table
当执行下面的命令时出现上述errorMariaDB [(none)]> grant all privileges on hive_meta.* to 'xiaoqiu'@'%';ERROR 1133 (42000): Can't find any matching row in the user tableresolution:发现出错的原因是我开始更改了user表的host...原创 2018-08-19 11:24:44 · 402 阅读 · 0 评论 -
MySQL新建用户无法登录
Access denied for user xiaoqiu@localhost (using password :NO) resolution:删除匿名用户(mysql.user表中user为空的用户)delete from user where mysql.user='';生效(更改了用户表,用户的权限都需要执行,否则需要重启MySQL服务)flush privil...原创 2018-08-19 11:24:35 · 1202 阅读 · 0 评论 -
java.net.ConnectException: Call From s150/192.168.109.150 to s150:8020 failed on connection excepti
启动hive遇到连接的问题:Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Call From s150/192.168.109.150 to s150:8020 failed on connection exception: java.net.ConnectException...原创 2018-08-19 11:22:39 · 552 阅读 · 0 评论 -
Underlying cause: java.sql.SQLException : Access denied for user 'root'@'s150' (using password: YES)
hive初始化元数据的时候出错,该root用户没有权限[xiaoqiu@s150 /soft/hive/conf]$ schematool -initSchema -dbType mysqlSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/soft/apache-hi...原创 2018-08-19 11:23:07 · 9546 阅读 · 2 评论 -
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
原创 2018-08-19 11:23:21 · 4065 阅读 · 2 评论 -
MariaDB [(none)]> drop user cr; ERROR 1396 (HY000): Operation DROP USER failed for 'cr'@'%'
首先查看mysql.user表中是否存在该用户如果存在,更新权限MariaDB [(none)]> flush privileges;重新执行删除操作MariaDB [(none)]> drop user 'cr'@'localhost';查看用户表MariaDB [(none)]> SELECT DISTINCT CONCAT('User: ''',user,'''@''',h...原创 2018-07-04 09:09:28 · 3711 阅读 · 0 评论 -
mysqld_safe A mysqld process already exists
解决办法:原创 2018-07-04 08:59:00 · 26820 阅读 · 0 评论 -
Failed to stop mariadb.service: Interactive authentication required.
换成root用户就可以了[root@s150 /home/xiaoqiu]# systemctl stop mariadb.service原创 2018-08-19 11:23:30 · 10601 阅读 · 1 评论 -
centos7自带数据库MariaDB重启和修改密码
1:MariaDB和mysql差不多是mysql的一个分支,完全兼容mysql的命令。2:centos 7 中自带MariaDB, 需要在centos中安装mysql的时候就需要多注意了。3:启动 停止 重启 MariaDB &nb...转载 2018-07-04 08:18:40 · 1875 阅读 · 0 评论 -
MySQL创建用户,并设置指定访问数据库
一、创建用户并授权1. 登录mysql mysql -u root -q输入密码2. 创建数据库(已有数据库就不需要建立)create database newDB;//以创建newDB为例3. 创建用户创建userone,只能本地访问 create user userone@'localhost' identified by...转载 2018-07-03 18:47:24 · 932 阅读 · 0 评论 -
Mysql中新建用户,设置密码
Mysql中新建用户,设置密码新建用户step 1.创建用户: CREATE USER 'aaa'@'%' IDENTIFIED BY '123456';表示创建新的用户,名为aaa,新用户密码为123456,'%'表示允许远程登陆但是不允许本机登录 CREATE USER 'bb...转载 2018-07-03 18:41:00 · 769 阅读 · 0 评论 -
navicat连接Linux数据报错can't connect server error 2003
linux配置防火墙打开3306端口 <div class="postBody"> <div id="cnblogs_post_body" class="blogpost-body"><p>安装完MYSQL服务器后在本机所有操作都正常, 但在其它机器上远程访问这个MYSQL服务器时怎么都连接不上. shit!</p>怀疑是端口问转载 2018-05-07 17:08:23 · 567 阅读 · 0 评论 -
jdbc事务并发现象
1、脏读1.1避免脏读现象#避免脏读#开启事务Astart transaction;#关闭自动提交set @@autocommit = 0show variables like '%autocommit%'update student set name = 'kangkang232' where id =1;select * from student where id =1rol...原创 2018-03-06 17:05:51 · 760 阅读 · 0 评论 -
mysql函数
1、创建函数#创建函数create function fun_add(x1 int,x2 int) returns INT begin return x1 + x2; end#查看函数show function status;show function status like '%add%'#调用函数select fun_add(1,2)2、Java调用函数 @org.ju...原创 2018-03-06 17:06:18 · 131 阅读 · 0 评论 -
hive-连接查询
内连接查询hive> select * from customer as c , orderInfo as o where c.id = o.cid;11 tom1 1 cc price1 1112 tom2 2 dd price2 1212 tom2 3 ss p...原创 2018-08-28 17:21:14 · 484 阅读 · 0 评论