快速登录MySQL数据库
[root@tdh51 docker]# mysql -h localhost -u transwarp -p$(cat /etc/transwarp-manager/master/db.properties | grep io.transwarp.manager.db.password | awk -F = '{print $2}') -S /var/run/mariadb/transwarp-manager-db.sock
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> DROP DATABASE transwarp_manager;
Query OK, 46 rows affected (0.03 sec)
MariaDB [(none)]> CREATE DATABASE transwarp_manager CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> exit
Bye
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[root@tdh01 ~]# cat /etc/transwarp-manager/master/db.properties
io.transwarp.manager.db.driver=com.mysql.jdbc.Driver
io.transwarp.manager.db.url=jdbc:mysql://localhost:3308/transwarp_manager?autoReconnect=true&createDatabaseIfNotExist=false&characterEncoding=UTF-8
io.transwarp.manager.db.user=transwarp
io.transwarp.manager.db.password=kgjOAJQ4Pw
[root@tdh01 ~]# mysql -h localhost -P 3308 -S /var/run/mariadb/transwarp-manager-db.sock -u transwarp -pkgjOAJQ4Pw -D transwarp_manager
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 24
Server version: 5.5.44-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
最新文章
- struts2杂记(一)——使用doubleSelect
- MVC 区域内默认控制器不能访问(Multiple types were found that match the controller named ‘Index')
- ios截取号码
- html本地服务器
- 服务器端与客户端TCP连接入门(二)
- AngularJS 初印象------对比 Asp.net MVC
- GPS坐标换算为百度坐标
- I2C实时时钟rx-8025板卡实际应用
- 算法_栈的Java的通用数组实现
- C++ Template之非类型模板参数
- lintcode 中等题:permutations II 重复数据的全排列
- HDU5692 Snacks DFS+线段树
- Emmet:一个Html/Css快速编辑神器的插件
- SQL Server 性能优化之——系统化方法提高性能
- 前端笔记----jquery入门知识点总结
- SQL大数据查询优化
- Java基于opencv—归一化
- 安装淘宝npm(cnpm)
- Jenkins在windows服务器上依赖的maven仓库目录
- mongodb的副本集|备份|恢复备份