Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghost install default database name causes installations to share a database instance #453

Closed
2 tasks done
TomChantler opened this issue Aug 17, 2017 · 1 comment · Fixed by #454
Closed
2 tasks done

Comments

@TomChantler
Copy link
Contributor

This issue is a

  • Bug Report
  • Feature Request

Summary

If you run ghost install (to do a production installation) then it prompts you to create a mysql database called ghost_production.

If you run another installation, it also suggests the same database name. When I accepted the default twice in a row, I ended up with two blog installations sharing the same database and chaos ensued.

I reckon it would be better to include some kind of identifier in the default database name, so I can (probably) accept the defaults. Given the point in time at which the default prompt values are calculated, it's best to use the local folder name. e.g. if you are installing in /var/www/tom then the database name should be ghost_production_tom.

I have already fixed this in my branch.

Steps to Reproduce (for a bug report)

  1. run ghost install and accept the default database name
  2. repeat without changing the database name.

I reckon this is kind of a bug. It's certainly kinder if we offer a default name which is more likely to be unique. Making it definitely be unique is quite complicated and is a possible future enhancement.

Technical details (will be automatically output by Ghost-CLI if an error occurs):

  • OS:
  • Node Version:
  • Ghost-CLI Version:
  • Environment:
  • Command:
@acburdine
Copy link
Member

acburdine commented Aug 17, 2017

Sounds like a good solution 👍 care to make a PR for it?

acburdine pushed a commit that referenced this issue Aug 17, 2017
closes #453 
- make the default database name be based off of the current working directory basename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants