数据库SQL-MySQL-SQLServer-Oracle-PGSQL-在Linux中安装SQLServer

==============================================
MySQL
https://downloads.mysql.com/archives/installer/
官方工具集 https://downloads.mysql.com/archives/
==============================================
忘记MySQL 密码
先关闭mysql服务,再带参数启动
./mysqld_safe –skip-grant-tables
进mysql命令行
mysql -uroot -p
执行更新
update mysql.user SET Password=PASSWORD(‘password123′) where USER=’root’;
update mysql.user set authentication_string=password(‘password123′) where user=’root’;
update mysql.user set grant_priv=’Y’ where user=’root’ and host=’%’;
grant all privileges on *.* to root@”%” identified by “Password123”;
grant all privileges on *.* to root@”127.0.0.1″ identified by “Password123” WITH GRANT OPTION;
select host,user,password,authentication_string from mysql.user;
flush privileges;
退出重启MySQL,密码已变更为password123
==============================================
PQSQL
https://www.postgresql.org/download/

==============================================
Microsoft® SQL Server® 2017 Express
https://www.microsoft.com/zh-CN/download/details.aspx?id=55994
官方管理工具 SQL Server Management Studio
https://docs.microsoft.com/zh-CN/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017

Yes, SQL Server 2008 R2 Express with Tools and SQL Server 2008 R2 Express with Advanced Services will allow 10GB databases as well.
SQL Server 2008 R2 Express is still limited to 1 CPU and 1 GB or RAM.
免费版有内存使用和数据库大小的限制, 10G数据库,1G内存,1CPU,
作为测试,要用那么多资源干啥??

==============================================
# 在Linux中安装SQLServer
https://learn.microsoft.com/zh-cn/sql/linux/quickstart-install-connect-docker
sql-server-management-studio
https://learn.microsoft.com/zh-cn/ssms/download-sql-server-management-studio-ssms#download-ssms
https://aka.ms/ssmsfullsetup

==============================================

Oracle Database XE , Free Oracle Database for Everyone
https://www.oracle.com/database/technologies/appdev/xe.html
Oracle SQL Developer
https://www.oracle.com/cn/tools/downloads/oracle-sql-developer-download.html

序号版本数据限制内存限制处理器限制
 1 XE 18c 12GB 2GB 2*CPU
 2 XE 11gR2 11GB 1GB 1*CPU
 3 XE 10g 4GB 1GB 1*CPU

一台机器上只能安装一个 XE 实例, 最大数据库大小为 12 GB,可使用的最大内存是 2G
==============================================

管理工具
heidisql
https://www.heidisql.com/download.php

快速导出数据库结构
SmartSQL
https://gitee.com/izhaofu/SmartSQL

错误提示:ERROR 1273 (HY000): Unknown collation: ‘utf8mb4_0900_ai_ci’
是因为linux下MySQL版本不兼容导致的
我们需要做的是打开我们导出的的sql文件

• 把文件中的所有的utf8mb4_0900_ai_ci替换为utf8_general_ci
• 以及utf8mb4替换为utf8

最后再重新导入成功。

ALTER USER ‘sqluser’@’%’ IDENTIFIED WITH mysql_native_password BY ‘sqluser’;
FLUSH PRIVILEGES;

CentOS7-防火墙命令

在Centos linux 6及以前的版本,操控防火墙用的命令是iptables,

在Centos linux 7 及其以后的版本,操控防火墙的命令变化了,

现在用firewall-cmd这个命令来操作防火墙了,现记录如下:

一、查看防火墙已有规则列表
firewall-cmd --list-all

二、开放端口用 –add-port
firewall-cmd --permanent --add-port=8080/tcp

三、移除端口用 –remove-port
firewall-cmd --permanent --remove-port=8080/tcp

四、刷新规则用 –reload 注意:防火墙操作在执行 –add-port与–remove-port指令后一定要刷新一下
firewall-cmd --reload

五、查看firewall的状态
firewall-cmd --state

六、查询端口是否开放用 –query-port
firewall-cmd --query-port=8080/tcp

五、防火墙其它管理操作命令
命令功能 命令
启动 firewalld.service服务
service firewalld start
停止firewalld.service服务
service firewalld stop
重启firewalld.service服务
service firewalld restart
查看firewall服务状态
systemctl status firewalld
六、备注
firwall-cmd:是Centos Linux 7.x提供的操作firewall的一个工具
–permanent:表示设置为持久有效,