mysql 远程端口3307 – 业余语言练习

mysql 远程端口3307

vim /etc/my.cnf
[client]
#password = your_password
port = 3307
socket = /tmp/mysql.sock

systemctl restart rc-local.service

vim frpc.ini
[mysql]
type = tcp
local_ip = 10.168.1.115
local_port = 3306
remote_port = 3307
custom_domains = 39.100.102.12

systemctl restart frpc.service

root135@root135:~/Desktop$ mysql -u root -p -h 39.100.102.12 -P 3307
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.0.51a-log MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MySQL [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| test |
+——————–+
3 rows in set (0.087 sec)

Published
Categorized as mysql

Leave a comment

Your email address will not be published. Required fields are marked *