# Installation My Sql in Azure

**URL:** https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440
**Category:** Questions
**Created:** [November 2, 2022, 12:49am UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440 "2022-11-02T00:49:05Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tj3000](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/tj3000/32/1242_2.png) [@tj3000](https://kanboard.discourse.group/u/tj3000)
#### Post date: [November 2, 2022, 12:49am UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/1 "2022-11-02T00:49:05Z")

</div>

Hello everyone.

I am using Kanboard with great success for many years, throughout softaculous, in shared hosting.

Now I’m trying to create a brand new installation, this time I would like to go a little further, uploading the code in the same shared hosting, but now, using Azure for my sql db.

I wonder if you guys can help with some kind of procedure, or step-by-step help, and be able to keep using this fantastic tool.

I’m very sorry to bother you guys with this request, but I looked everywhere and I could not find any instructions. I’m open to all suggestions, maybe there is a better forum to place this request.

Thank you very much in advance!

Juan.

---

<div class="post-metadata">

### Author: ![tj3000](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/tj3000/32/1242_2.png) [@tj3000](https://kanboard.discourse.group/u/tj3000)
#### Post date: [November 4, 2022, 1:15pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/2 "2022-11-04T13:15:11Z")

</div>

Hello guys!

I’d really appreciate any suggestions.  
Thank you.

---

<div class="post-metadata">

### Author: ![aljawaid](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/aljawaid/32/1090_2.png) [@aljawaid](https://kanboard.discourse.group/u/aljawaid)
#### Post date: [November 4, 2022, 1:34pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/3 "2022-11-04T13:34:09Z")

</div>

hello I dont know much about Azure, I’ve only used MySQL…

The main thing I learnt between migrating from shared to vps to another vps…

- make sure the database dump backup is done and check it is readable
- double check the database/tables correlation (that was where i messed up over the years somehow causing errors)
- do the database migration before installing any plugins… then you know its only kanboard-issue if anything is wrong
- pull up old tasks, comments, try to edit/save again…

---

<div class="post-metadata">

### Author: ![aljawaid](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/aljawaid/32/1090_2.png) [@aljawaid](https://kanboard.discourse.group/u/aljawaid)
#### Post date: [November 4, 2022, 1:37pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/4 "2022-11-04T13:37:12Z")

</div>

in terms of procedure… how i would do it (not knowing about azure)

- backup existing database
- install FRESH kanboard onto new server
- restore backup database into new database
- configure new copy and double check the config file… good time to restore the old config which contains the database info
- check if you can login/play around
- all passed

---

<div class="post-metadata">

### Author: ![tj3000](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/tj3000/32/1242_2.png) [@tj3000](https://kanboard.discourse.group/u/tj3000)
#### Post date: [November 4, 2022, 11:34pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/5 "2022-11-04T23:34:22Z")

</div>

Hello aljawaid thank you so much for your reply!

Actually, I’m creating an additional kanboard installation, the old one will remain as it is. Can you please help me with the procedure of creating the Kanboard DB in Mysql? Despite my DB will be located in Azure, it might result illustrating!

Thank you again!

J.

---

<div class="post-metadata">

### Author: ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)
#### Post date: [November 5, 2022, 2:41am UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/6 "2022-11-05T02:41:33Z")

</div>

ive never used azure. so kind of clueless, but you can run containers with it, from what i am reading.

so:

1. Study up on deploying a docker container in azure  
[Deploying Docker containers on Azure | Docker Documentation](https://docs.docker.com/cloud/aci-integration/)

2. Deploy a DB  
`docker run --name some-mysql -p 3306:3306 -p 33060:33060 -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=kanboard -d mysql:latest`

![mysql](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/3/347ab55fe5f1a3b0ece1e155915ea37558875551.gif)

1. Deploy KB container: [Run Kanboard with Docker — Kanboard documentation](https://docs.kanboard.org/en/latest/admin_guide/docker.html?highlight=docker)  
`docker run -d --name kanboard -p 80:80 -t kanboard/kanboard:v1.2.20`

![kb](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/b/b044ddf47843d8d93fd7610d3350bbfc81d97acf.gif)  
I use a few other ENV variables but thats up to you and how you are deploying.

1. Shell into the KB container using a console, and modify the config.php to include DB info:

```auto
define('DB_DRIVER', 'mysql');                                                                                    
define('DB_USERNAME', 'root');                                                                                                                                                
define('DB_PASSWORD', 'my-secret-pw');                                                                                        
define('DB_HOSTNAME', 'YOUR_DB_URL');                                                                           
define('DB_NAME', 'kanboard');                                                                                    
define('DB_PORT', '3306');

```

![db_paste](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/d/d73a1e68cbdeeac5acde798059e02ed9a34ddbed.gif)

1. Restart your container and give it a few minutes to migrate. Then browse to KB and check the settings panel. You will see it is now using Mysql.

![final](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/f/f413c24319cc64966c6e04114fcdbe19e408b157.gif)

Note: I tried this with KB v1.2.24 and it would not migrate, 1.2.22 and below seemed fine. Personally, I’d use 1.2.20 or below.

---

<div class="post-metadata">

### Author: ![tj3000](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/tj3000/32/1242_2.png) [@tj3000](https://kanboard.discourse.group/u/tj3000)
#### Post date: [November 5, 2022, 1:17pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/7 "2022-11-05T13:17:50Z")

</div>

creecros, thank you so much!

I have plenty to do, and I let everybody know how thigs are going. I have a subscription in Azure, so I hope to get their help also.

Thank you!!

---

<div class="post-metadata">

### Author: ![tj3000](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/tj3000/32/1242_2.png) [@tj3000](https://kanboard.discourse.group/u/tj3000)
#### Post date: [November 12, 2022, 3:26am UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/8 "2022-11-12T03:26:30Z")

</div>

creecros:

I have two questions.

A.

How, do assign define ‘YOUR\_DB\_URL’ in define (‘DB\_HOSTNAME’, ‘YOUR\_DB\_URL’);

B.

Let’s say I want to install kanboard in [www.mydomain.sub.com](http://www.mydomain.sub.com), how that is configured in this scenario? could you please specify that?

Thank you in advance! Once is done I will post some screen prints!

---

<div class="post-metadata">

### Author: ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)
#### Post date: [November 21, 2022, 10:45pm UTC](https://kanboard.discourse.group/t/installation-my-sql-in-azure/2440/9 "2022-11-21T22:45:12Z")

</div>

i dont know what your db server is, only you can tell me.

figure out the ip and port and fill in the info.

it would look something like:  
`(‘DB_HOSTNAME’, ‘http:\\192.168.1.1’);`
