[GH-ISSUE #65] A server is required #44

Open
opened 2026-02-25 21:33:07 +03:00 by kerem · 9 comments
Owner

Originally created by @SteamWind on GitHub (Dec 4, 2017).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/65

Hello, here is my config file:

server1:
	user: root
	password:
	port: 3306
	host: localhost
server2:
	user: root
	password:
	port: 3306
	host: localhost
template: templates/simple-db-migrate.tmpl
type: schema
include: all
nocomments: true

And here is the cmd I'm trying to run
./dbdiff server1.database:server2.database-prod output=./sql/simple-schema.sql
When my config file contain tabulations, it doesn't work (yaml can't contain tabulations). When I remove them, I'm getting the error A server is required.
There is no password for now on the database, does I need to set one to use DBDiff?
Thank you for your reply.

Originally created by @SteamWind on GitHub (Dec 4, 2017). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/65 Hello, here is my config file: ``` server1: user: root password: port: 3306 host: localhost server2: user: root password: port: 3306 host: localhost template: templates/simple-db-migrate.tmpl type: schema include: all nocomments: true ``` And here is the cmd I'm trying to run `./dbdiff server1.database:server2.database-prod output=./sql/simple-schema.sql` When my config file contain tabulations, it doesn't work (yaml can't contain tabulations). When I remove them, I'm getting the error `A server is required`. There is no password for now on the database, does I need to set one to use DBDiff? Thank you for your reply.
Author
Owner

@emente commented on GitHub (Dec 19, 2017):

Last three error messages:

✖ Unkown kind of resources
✖ A server is required
✖ Missing input

These error messages don't point to the problem. They tell you nothing. They are as helpful as "something went wrong".

<!-- gh-comment-id:352722408 --> @emente commented on GitHub (Dec 19, 2017): Last three error messages: ✖ Unkown kind of resources ✖ A server is required ✖ Missing input These error messages don't point to the problem. They tell you nothing. They are as helpful as "something went wrong".
Author
Owner

@aschkenasy commented on GitHub (Dec 25, 2017):

@SteamWind are you sure your config file is named .dbdiff (including period?)

<!-- gh-comment-id:353882083 --> @aschkenasy commented on GitHub (Dec 25, 2017): @SteamWind are you sure your config file is named .dbdiff (including period?)
Author
Owner

@SteamWind commented on GitHub (Dec 27, 2017):

Yes, sure.

<!-- gh-comment-id:354088955 --> @SteamWind commented on GitHub (Dec 27, 2017): Yes, sure.
Author
Owner

@ghost commented on GitHub (Mar 12, 2018):

@aschkenasy
Ditto here. This command throws the same error: ./dbdiff server1.epos:server2.epos

Here's my .dbdiff (anonymized)

server1:
user: username1
password: password1
port: 3306
host: sql.myserver.com
server2:
user: username2
password: password2
port: 3306
host: 10.50.50.22
template: templates/simple-db-migrate.tmpl
type: schema
include: all
nocomments: true

<!-- gh-comment-id:372338901 --> @ghost commented on GitHub (Mar 12, 2018): @aschkenasy Ditto here. This command throws the same error: ./dbdiff server1.epos:server2.epos Here's my .dbdiff (anonymized) server1: user: username1 password: password1 port: 3306 host: sql.myserver.com server2: user: username2 password: password2 port: 3306 host: 10.50.50.22 template: templates/simple-db-migrate.tmpl type: schema include: all nocomments: true
Author
Owner

@alexisbrabo commented on GitHub (Mar 20, 2018):

I have this issue too.

<!-- gh-comment-id:374740398 --> @alexisbrabo commented on GitHub (Mar 20, 2018): I have this issue too.
Author
Owner

@ghost commented on GitHub (Apr 30, 2018):

It worked for me by using spaces instead of tabs for the intendation in the .dbdiff file.

<!-- gh-comment-id:385323527 --> @ghost commented on GitHub (Apr 30, 2018): It worked for me by using spaces instead of tabs for the intendation in the .dbdiff file.
Author
Owner

@burhandodhy commented on GitHub (Apr 30, 2018):

same issue 🤯

<!-- gh-comment-id:385323874 --> @burhandodhy commented on GitHub (Apr 30, 2018): same issue 🤯
Author
Owner

@caleb-gosnell commented on GitHub (May 22, 2019):

I was receiving the error "A server is required."
My problem was in .dbdiff I changed "server1" and "server2" to be my actual server names.
After I changed them back, it worked fine.

<!-- gh-comment-id:494888974 --> @caleb-gosnell commented on GitHub (May 22, 2019): I was receiving the error "A server is required." My problem was in .dbdiff I changed "server1" and "server2" to be my actual server names. After I changed them back, it worked fine.
Author
Owner

@goodd21 commented on GitHub (Jul 18, 2019):

have anyone fixed the problem? I tried different intendation and my server names are default ones (server1 and server2) and I still see this error

<!-- gh-comment-id:512750018 --> @goodd21 commented on GitHub (Jul 18, 2019): have anyone fixed the problem? I tried different intendation and my server names are default ones (server1 and server2) and I still see this error
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#44
No description provided.