How to use mongoDB database with Magento? - mysql

I am working on a project for Magento. I am recently using MYSQL database. I want to migrate it to MongoDB database.
I have installed MongoGento on my system to interlink MongoDB and Magento.
I have run the following command on my command prompt:
php < <(wget -O - https://raw.github.com/Smile-SA/mongogento/master/installer.php)
But was in vain as it was not working.
Please guide me how can I run Magento in MongoDB.

Related

How to switch from MySQL to Postgre on Heroku

I want to host a django project on heroku. Locally, I developed it using MySQL database. And I have also pushed it to heroku but I get an Error message whenever I run heroku open command on command prompt. The error message is Can't connect to local MySQL server through socket. Though I'm a newbie in using databases, the way I understand the error is that heroku can't connect to local MySQL server which I'm using for local development. I don't want to connect to a remote MySQL database, instead, I want to connect to Postgre database just as heroku recommended.
Being a newbie in the use of database, I don't know the best way to migrate to Postgre or how to add MySQL in my project to .gitignore. Is it possible for me to start running Postgre on heroku while MySQL isn't added to . gitignore and is still the database in settings.py? Must I clear MySQL database or add it to gitignore before I can use Postgre?
PostgreSQL settings for Heroku:
Please install dj_database_url using below command:
pip install dj-database-url
In settings.py , import dj_database_url and add below settings at the end of the file:
import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
Done !! Now, deploy again to Heroku.

How to connect to a mysql database from Django?

I have an inscription.sql on a WAMP localhost:80 server, and I have also Django running on visual studio via a localhost:xxxx server.
I want to connect Django to the mysql database located on the wamp server (I have successfully installed MysqlClient).
Is there anyway to do this?
See the official guide to using an already existant database with Django.
To sum up, what you need to do is:
Make sure Django can connect to your database by setting the right DATABASE setting. From your comment, this seems to be the case.
Generate models (Python code) that match the tables in your database using the python manage.py inspectdb command. You must paste the generated code in the models.py file of an installed app and review them to make sure they fit your needs.
Create the tables required by Django with the python manage.py migrate command.
From the docs
Jus set the DATABASES variable in settings, then run python manage.py inspectdb > models.py put the generated models.py in the app's folder and finally run python manage.py migrate

Kallithea sqlite database to mysql database

I've Kallithea running on my own server with sqlite database. I would like to move all this data to MySQL database instead. On default Kallithea uses sqlite if not any other database is specified. From Kallithea documentation pdf https://media.readthedocs.org/pdf/kallithea/latest/kallithea.pdf they recommend to use https://github.com/shazow/sqlalchemygrate to migrate data from database to another.
I'm installed sqlalchemygrate using Python pip but when I try to migrate there is parts what I don't understand at all. Help menu doesn't not clearly specify how to use migrate command. At least I don't understand it at all. For example when I try to type
grate migrate "sqlite:./kallithea.db" "mysql://kallithea#localhost/kallithea"
I get error saying
ImportError: No module named sqlite
In help menu it says to use
migrate METADATA ENGINE_FROM ENGINE_TO
Migrate schema or data from one engine to another.
And example how to use it
grate migrate model.meta:metadata \
"mysql://foo:bar#localhost/baz" "sqlite:///:memory:" \
What I don't really understand is what is that metadata it needs? And how to specify sqlite .db file for this. And how to migrate data to new kallithea database in mysql with user kallithea which has all privileges to that database.
Not sure about Kallithea but RhodeCode users had a great success using TAPS (https://github.com/ricardochimal/taps) project to migrate they databases to different format.
ImportError: No module named sqlite
You probably need to install sqlite, and pip install sqlite or similar.
Regarding what metadata it needs, it's referring to metadata in the context of SQLAlchemy: http://docs.sqlalchemy.org/en/latest/core/metadata.html

Migrating a local mysql database to heroku postgres from a cakephp application

Hi I'm trying to migrate a database that was created with cakePHP on a local MYSQL database. I know that in rails the solution is to install the postgres gem that will handle the migration, but I'm wondering more specifically about cakePHP.
I've generated a sqldump of the mysql database using the solution here:
http://book.cakephp.org/2.0/en/console-and-shells/schema-management-and-migrations.html
I've also installed postgres locally onto my machine and am able to connect to my remote empty HEROKU database from the command line by using heroku pg:psql
However, if I run the SQL dump file directly in the console I get an error called SSL SYSCALL error: Software caused connection abort. This apparently is because as a DEV / Free database account you are restricted from entering SQL commands directly.
So, that would suggest that I would have to go and use something like
heroku db:push localdatabase herokudatabase
But that produces the error Sequel::AdapterNotFound -> LoadError: 193: not a valid Win32 application
Any ideas how I might manage this migration, bearing in mind that as it's a CakePHP application I do not have the option of just installing a PostGres gem?
Thanks for any direction, or thoughts.
You almost certainly want to install Postgres locally on your machine, and get your database and code working correctly there. Once it's set up, it's easy to do a dump of your Postgres database and upload to Heroku.

How can I find the database I created for my Rails application locally and load it to a server?

I am using Lynda.com Rails tutorial. I created a MySQL database for my Ruby on Rails application simple_cms.
The database is called simple_cms_development.
Let's say I want to move this database into a new server, where do I find it?
I am running rvm, and I saw mysql is inside this rvm, but I am not able to access it. I searched my computer for simple_cms_development , and couldn't find anything either. Any ideas? Thanks
Copy the source code from the original machine to the new machine, or get it onto your new machine from a remote repository using git.
Run rake:db:create in the application directory on your new machine. This is assuming you have MySQL running on the new machine.
Use either the mysql client or the mysqldump utility to get a dump file of your MySQL database from your original machine.
Copy the dump file to the new machine and load it into the database using the MySQL client.
You can google the details of how to use git, dump and load MySQL, etc.
RVM is a tool for managing Ruby versions and gems. A Rails project backed by a MySQL database will need to use some Ruby gem (like mysql2) to allow the Rails app to talk to the MySQL database. All you're seeing in the .rvm directory is the gem. I'm not sure if the usual MySQL gems provide functionality to dump or load a database, at any rate you may as well use the MySQL client directly.