debian9安装mariadb导致密码无效问题

debian9默认就是mariadb这个数据库,mysql一样
sudo apt install mariadb-server
sudo -i
mysql -u root -p
1 use mysql; 然后敲回车
2 update user set authentication_string=password(“你的密码”) where user=”root” 然后敲回车
3 flush privileges 然后敲回车上面操作都没有用的
#select user,plugin from user后看看,错误原因是因为plugin root的字段是auth_socket,那我们改掉它为下面的mysql_native_password
update user set authentication_string=password(“123456”),plugin=’mysql_native_password’ where user=’root’;
flush privileges;
到处都是坑
参考:http://blog.sina.com.cn/s/blog_7c987bee0102yz76.html

时序数据库InfluxDB在centos7安装使用

安装过程:
curl -O https://dl.influxdata.com/influxdb/releases/influxdb-1.7.7.x86_64.rpm
yum install influxdb-1.7.7.x86_64.rpm
systemctl start influxdb
systemctl status influxdb
配置安全选项
vim /etc/influxdb/influxdb.conf
[http]
enabled = true
bind-address = “:8086”
auth-enabled = true
log-enabled = true
https暂不开启
登录
influx -precision rfc3339
有密码登录
influx -precision rfc3339 -username ‘admin’ -password ‘admin’
设置密码(必须登录,先停止安全配置,重启influxdb)
CREATE USER admin WITH PASSWORD ‘‘ WITH ALL PRIVILEGES
数据库连接使用
NET:https://github.com/influxdata/influxdb-java
java:https://github.com/AdysTech/InfluxDB.Client.Net

Centos7安装mysql5.6

wget http://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64//mysql-community-release-el7-5.noarch.rpm
rpm -Uvh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
systemctl start mysql
systemctl status mysql
mysql -u root
use mysql;
update user set password=PASSWORD("root") where User='root';
update user set host='%' where Host='localhost' and User='root';
flush privileges;

mysql压缩版安装

1、解压到一个目录,修改配置文件

my-default.ini
basedir =E:\ProgramFiles\mysql-5.6.43-winx64
datadir =E:\ProgramFiles\mysql-5.6.43-winx64\data
port =3306

管理员打开CMD命令

mysqld -install
mysqladmin -u root -p password malong#修改密码
mysqld -remove
net stop mysql
mysql -u root -p

use mysql;报错
ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql
mysql -u root -p
换下面方式,为什么?权限问题?我也不懂
mysql -uroot -p
mysqladmin -uroot -p123 password 123123
修改密码后2种方式登录就没有关系了