我目前正在将我的项目数据库从mySQL切换到oracle,并且我是oracle的新手。
以前,mySQL查询如下所示:
CREATE TABLE log_remote (
log_no NUMBER(11) NOT NULL AUTO_INCREMENT,
dttm DATETIME(3) NOT NULL,
log_code VARCHAR2(20) NOT NULL,
log_type VARCHAR2(255) NOT NULL,
product VARCHAR2(64) NOT NULL,
detail VARCHAR2(2048) NU
我在我的macOS 10.14上有MAMP 5.5,它在3306端口上使用MySQL。我刚刚通过brew为一个烧瓶教程安装了MySQL,我做了brew install mysql。一切都很顺利。现在我想,如果我启动MAMP,它会抱怨端口3306已经在使用。但事实并非如此!
mysql --version
mysql Ver 8.0.18 for osx10.14 on x86_64 (Homebrew)
在mysql中:
mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
+---------------+-------+
| Varia
我在我的Mac终端上运行mysql数据库:
(base) Johns-MacBook-Pro-3:~ johndoe$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.20 MySQL Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All righ
我有操作系统
NAME="Oracle Linux Server"
VERSION="7.4"
ID="ol"
VERSION_ID="7.4"
PRETTY_NAME="Oracle Linux Server 7.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://
在我的本地计算机上,我可以使用mysql cli命令轻松地连接到mysql数据库的远程实例(假设设置了环境变量):
# mysql -u root -p$DB_PASSWORD -h $DB_HOST --port=$DB_PORT
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7365
Server ver
我可以用ssh连接到mysql服务器。
# mysql -u username -h 185.2.3.80 -ppasword
产出如下:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 280
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a regist