当前位置:网站首页>Gin Vue admin uses the database in the docker container
Gin Vue admin uses the database in the docker container
2022-07-27 06:46:00 【lianyz1985】
The situation of this machine
- Use gin-vue-admin The branch of gin-vue-admin_v1_stable
- mysql8.0 Containers Port is 3307
initialization mysql Database in container
By the following command will qmplus.sql Copy files to container
cd ~/gin-vue-admin/QMPlusServer/db/qmplus.sql
docker cp ./qmplus.sql mysql8.0:/home
Through container CLI Enter the command line of the container ;
Run the following command to create the database
mysql -u root -p
> create database qmPlus;
> use qmPlus;
> show databases;
> show tables;
> source /home/qmplus.sql;
Running the back end
Modify backend database configuration
~/gin-vue-admin/QMPlusServer/static/config/config.json Modify the following
"mysqladmin": {
"username": "root",
"password": "root",
"path": "127.0.0.1:3307",
"dbname": "qmPlus",
...
Compile and start the backend
cd ~/gin-vue-admin/QMPlusServer/
go build
./gin-vue-admin
Run front end
cd ~/gin-vue-admin/QMPlusVuePage/
npm install
npm run serve
边栏推荐
- FTP服务器的搭建
- 自己动手实现容器
- Source code compilation and installation lamp and discuz Forum
- keras-ocr实例测试
- Soul 递交港股上市申请,加快社交聚集地多元化、场景化的布局
- Webodm win10 installation tutorial (personal test)
- Stress performance test of website based on AB tool under Apache
- Open source WebGIS related knowledge
- goLang的一个跨域问题
- FTP service introduction and configuration
猜你喜欢

2021-06-26

Redis快速学习
![Summary of frequently asked questions in the interview [summarized after painstaking work all night]](/img/70/90543c23326305590242716b989643.png)
Summary of frequently asked questions in the interview [summarized after painstaking work all night]

Inventory of the world's six most technologically competent smart contract audit companies in 2022

Remote access and control

QGIS series (1) -qgis (server APACHE) win10 installation

Ftx.us launched stock and ETF trading services to make trading more transparent

云原生运行环境搭建

DNS domain name resolution service

PXE高效批量网络装机
随机推荐
Shell -- circular statements (for, while, until)
Shell -- operation of variables
Some applications of std:: bind and std:: function
Iptables firewall, SNAT and DNAT
NAT(网络地址转换)
3D打印品牌的康复骨科支具有何特别之处?
ArcGIS for JS API (1) get all field names of FeatureLayer
ES6新特性(入门)
If conditional statement of shell
iptables防火墙
Multimodal database | star ring technology multimode database argodb "one database for multiple purposes", building a high-performance Lake warehouse integrated platform
项目实训经历2
About the problem that Druid can't connect to the database
The difference between malloc and new - Practical chapter
Basic knowledge of English: Rules for using attributives Part 2
DHCP的概念和原理
where接自定义函数导致查询缓慢
Shell programming specification and redirection and pipeline operation
Source code compilation and installation LNMP and discuz Forum
Linux安装Redis操作