In my go project I install gobuffalo:
go get github.com/gobuffalo/pop/...
And then I run soda migrate but I got this error There is no connection named development defined!
Does anyone know what problem I am facing with?
First a quick reply, explanation below.
Delete the database.yml file.
Force soda to create the same file with the command "soda g config"
After that my "soda migrate" command stopped giving the error and worked. (Don't forget to put your db cofig details in the generated file in the first section (development) only)
In Detail
Actually I copied an old working directory of Go to create another one. In the new place it was not working. I think that was the problem. If still not working try installing SODA and do the above in the new place, I did that also.
https://gobuffalo.io/documentation/database/soda/
https://gobuffalo.io/documentation/database/configuration/
For me, I named the file database.yaml initially, changing the name of file to database.yml worked just fine.
Please ensure you don't have any formatting extension's available I was initially getting the same issue later resolved by 'uninstalling' prettier.
Steps I followed:
'soda g config' and edit your database.yml (make sure it is 'database.yml')
I was also creating some Fizz migrations 'soda generate fizz table_name'
Edit changes to the database.yml file (I am using Dbeaver by default it usually asks you to set user as 'postgres' and if you have any password set in order to make connection with 'postgres' you can use that same password in the password)
i.e
development:
dialect: postgres
database: db_name
user: postgres
password: ****
host: 127.0.0.1
pool: 5
now you can use 'soda migrate' or 'soda migrate up' in case you have some
code there for creating a table
may this approach helps :)
Related
I'm trying to work on a new project and I red about Data Cube that can really help me.
In order to use it and to try to work with it, I installed postgres as required on the official website: https://datacube-core.readthedocs.io/en/datacube-1.4.1/ops/db_setup.html
When trying to initialize the dataset with this command:
datacube -v system init
I get the error: "Error: No datacube config found"
As requested I added env var and tried to put the config file everywhere (home dir, default, current...)
config file:
[datacube]
db_database: datacube
# A blank host will use a local socket. Specify a hostname (such as localhost) to use TCP.
db_hostname:
# Credentials are optional: you might have other Postgres authentication configured.
# The default username otherwise is the current user id.
db_username: postgres
db_password: postgres
I'm using windows 10 with conda, python 3.8,
Do you know what I'm missing?
TIA
As provided in documentation -
Datacube looks for a configuration file in ~/.datacube.conf or in the
location specified by the DATACUBE_CONFIG_PATH environment variable.
Make sure you file name is datacube.conf and it is in the proper path
I am new with Laravel and working on a project to practice myself. I have set up and connected my database and when I try to execute the migrate command on the VS Code terminal, I get the error: Illegal Instruction: 4
I have seen different discussions but was not able to find one with good instructions to solve this.
Most of them were for other programs and not Laravel/VS Code.(also I am a Mac user)
Any ideas on this and how to solve it?
enter image description here
This error seems to occur if you have SSL issues or config issues in the options section.
It may be how the composer runs from a root directory and it cannot find the real path of a SSL certificate.
We experienced this due to an incorrect configuration on Symfony[*] where the the mysql port was set to 33060 instead of 3306.
I think you can get this error if your mysql configuration is pointing to the wrong host/port combination, possibly combined with SSL enabled.
The issue is in the php mysql layer so which framework is in use is not so important.
You are trying outside the project folder you should go inside your project folder
cd YOUR_FOLDER_NAME
then
php artisan migrate
When trying to install CiviCrm in Drupal 7 I get "Could not create a database trigger".
Using a standard ddev config.yml for drupal7.
A couple of solutions are suggested at https://civicrm.stackexchange.com/questions/2770/database-trigger-error-message but I am struggling to implement them within ddev.
RE Grant - When I try ddev exec mysql GRANT..... I get failed to execute command. When I ssh into a mysql shell to try to grant privileges I get access denied for user.
RE log_bin_trust_function_creators = 1. Where would I insert that?
Update 2019-01-25: I went to check this out after you created the issue and what I suggested was inadequate. As explained there, you need to do a little custom config. Create a .ddev/mysql/trigger.cnf with these contents:
[mysqld]
log_bin_trust_function_creators=on
And the next release of ddev (mid-February) will make this the default (PR). So please report your results there. I was able to install CiviCRM with this mysql config.
Original response: True but not adequate for triggers:
The db container root user has full privileges, so you can use mysql -uroot -proot ... to do what you need to do. You can do that inside the db container ddev ssh -s db or inside the web container ddev ssh or from the host using the info in ddev describe (but using root/root). (You can also use the root user to grant additional privileges to the db user, of course.)
If you know what privileges are required, we should add them to the db user, so please make an issue requesting what you need, because we'd like this to be easier for you.
Anyone familiar with this error i'm getting?
Please help thanks.
If you are using Laravel 5.3 do the following:
From the upgrade guides: The AuthorizesResources Trait
The AuthorizesResources trait has been merged with the AuthorizesRequests trait. You should remove the AuthorizesResources trait from your app/Http/Controllers/Controller.php file.
Seems like the problem is with your version of laravel/framework.. Running composer update should pull in the latest version (which is 5.2.39). If that doesn't work for you, then I'm not sure what else you can do. Perhaps try composer self-update before you do it.
If you run composer info laravel/framework the 4th line should show you the latest version from packagist, which is: 5.2.39.
Edit: You could try and clear your package cache: composer clearcache
Does Laravel connect to database? I had this error and it was caused by a wrong database configuration in .env file.
Try these settings in .env file:
1. Open .env file in your project's folder. Don't touch the .env.example file found in the same location as it's an example of .env default configuration. If something goes wrong with your .env file, you can copy and paste the configuration from the .env.example file to .env.
2. Change the following 4 lines to your own configuration:
DB_HOST=localhost
DB_DATABASE=forge
DB_USERNAME=forge
DB_PASSWORD=
DB_DATABASE It's the name of your database. Should be 'forge' by default or check your phpMyAdmin to determine which database you need to use. You can create a new database if you're an administrator of phpMyAdmin ('root' user).
DB_USERNAME This is your username when you log in to phpMyAdmin. Should be 'forge' by default.
DB_PASSWORD Your phpMyAdmin should not be protected with password by default. The password is set later manually. In case you'll set the password, add it to DB_PASSWORD line after you do so.
3. Save the modified .env file and restart the Apache server.
Try to access your webpage again. This worked for me. I hope it's gonna work for you, too.
P.S. If it doesn't work, check if the .env configuration is right for you. Or use php artisan config:clear to clear cache.
I am deploying a ruby / sinatra app to aws. I need to write a myapp.config file to store the credentials for mandrill email service and also to get my postgresql connection to work. I am using sequel ORM. The myapp.config is stored in the .ebextensions directory.
So far I have:
packages:
yum:
postgresql93-devel: []
options:
MANDRILL_APIKEY: my_key
MANDRILL_USERNAME: my_username
This seems terribly wrong to me and, needless to say, it does not work.
Where am I going wrong? All help gratefully received.
The directory structure is:
/myapp
app.rb
config.ru
/.ebextensions
myapp.config
/views
Sorry this is a poorly articulated question. The answer, however, took a while to find. And it is:
option_settings:
- option_name: MANDRILL_APIKEY
value: my_mandrill_api_key
should be saved as my_file_name.config in the .ebextensions folder that you create in the root of your app directory where there is already a .elasticbeanstalk folder which you should not mess with.
The issue of database connecting is also simple: Use the Sequel connection string ans stick it at the top of your app file under the require list. Like so:
DB = Sequel.connect('postgres://db_user:password#aws_rds_url.com:5432/db_name')
I hope this helps somebody else, took me a while to figure it out.