As am Mysql Dba new in Magento FrameWork am unable to find from where the Magento queries are triggering can any tell me the location from where these queries are running
You have not specified which modules data files. Or which query you want to check. Mangento use MVC structure. You will find all data related operations in model. It will be located in app/code/codepool/namespace/module/model
Here code pool will be local or community and third is core but if you want modified file from core copy in local and make changes.
Namespace will be company name and module will be module name.
Hope this will help.
Related
I have been working on a project lately and using node as my back-end but instead of Mongodb I am using MySQL as my DBMS as I will need it in my project but I am having trouble organizing MySQL queries and can't find a good solution that helps me structure my code and files right. And another issue is that I don't know when to close my connection or if leaving it is a good practice or not.
NOTE: I already use express generator for generating my file architecture my only problem is where to place the MySQL related code and what are the best practices for a clean code.
You can create a model folder and add all your 'tables'.js there.
You can also create a DB.js file, so you can use Mysql from Nodejs and also manipulate it from the prompt:
Model Exemple
I.e of DB connection:
DB Connection
You can create tables on the way below. ID's, creating date and updated date are created automatically by Nodejs, so you don't need to worry about.
how to create a table
You also will need to download mySQL (npm install MySQL --save) and to interact with MySQL (selects, deletes,...)
Another way is create a repository.js and add SQL queries there, but is not really useful since you are using nodejs and it provides you these queries.
I've this weird problem. I have a Grails app in which some database changelog files are missing. Therefore, the database has gone out of sync with the domain classes. I've done some changes in the domain classes. When I try to run the database migration plugin, it is creating a diff betweeb the current domain classes and the database and try to execute all the sql commands that has already been run which is causing error in executing the commands that I want to execute.
Is there is a solution for this problem?
If I understand your problem correctly, you can re-create all of the missing changelogs using dbm-generate-changelog. This will create changelogs based on the current data model. Then you can use dbm-changelog-sync to mark those changelogs as EXECUTED (which will populate the DATABASECHANGELOG table). Once the DATABASECHANGELOG table is in sync with the current data model, you can use dbm-gorm-diff to make sure you're not missing any other data model changes.
https://grails-plugins.github.io/grails-database-migration/1.4.0/ref/Maintenance%20Scripts/dbm-changelog-sync.html
NOTE: My answer assumes you're using Grails 2.x and Database Migration plugin 1.4.x, but I believe the process is similar in Grails 3.x with Database Migration Plugin 2.x or 3.x.
how to see my liferay table in mysql database?
i have created portal-ext.properties in liferay home.but i cant see my liferey table mySql..
table is created in docroot/web-inf/sql in eclipse IDE...
help me where i m wrong and which thing missing?
#
# MySQL
#
include-and-override=portal-ext.properties
include-and-override=${liferay.home}/portal-ext.properties
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/kportal?useUnicode=true&characterEn
coding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=ubuntu123
schema.run.enabled=true
schema.run.minimal=true
Tables created through service-builder will only be created once you deploy your plugin to the actual server (and run the server), not on build time. Also, your plugin needs to deploy correctly - if initialization fails (e.g. due to missing pieces or dependencies that are not met), the tables will not be created.
Also, the tables by default will be named with the namespace you gave as a prefix. So if you declare a namespace X (in service.xml) and an entity named Y, the table to look for will be named X_Y.
Also, remember you'll have to run ant build-services after you edited your service.xml. Then deploy it and wait for a log message similar "...your plugin... is available for use" to be sure it deployed correctly. (Edit: This is no longer printed for portlets, only for the other plugin types, so you might not see it when you deployed your plugin)
If this doesn't help, please give more information. Currently you don't give any details about what you've actually tried. You'll find more steps and details on the development guide.
Also, make sure
that the account you use for the database has CREATE TABLE permissions (you use root in your configuration above - that should do the trick)
that you're checking the correct database in case you have multiple
that Liferay actually picks up your configuration file. The startup log will tell you which portal-ext.properties files are read, as well as which database it will use. In case you can't find the name/location of your portal-ext.properties file, make sure that you indeed have a file with this name. A common problem on windows is that people create portal-ext.properties.txt (and Windows hides the .txt part of the name)
Using Entity 4.1 for a project, and couldn't figure out where the DB file been stored inside my project.
I think I've read that Entity code first will still store your data in SQL Express DB at a default location, but couldn't find out where it is.
What I did is:
create Entity DB project (Project A) in my solution, this project will have an Initializer to generate sample data for testing.
I also create a separate project (Project B) to save my Entity Code first data for testing by another application.
Then I create another WinForm project(Project C) in the same solution, and access DBContext from Project A.
I would assume that the DB should be somewhere in my Project C, and test projects in the solution shouldn't make a difference?
With a default installation of SQL Server Express and no connection string the database will be created in the DATA directory of the installation, for example something like: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA (for 2008 R2 version). The name of the database is namespace.contextname, for example: MyNamespace.MyContext.mdf (and .ldf). Under this name you can also find them in SQL Server Management Studio.
I know this is an ancient thread covering a different scenario, but google directed me here when I was trying to figure this out for a UWP app, so if anybody follows in my footsteps, here's my solution.
If you're using entity with sqlite in a windows app, your database file will likely be created in the "working directory" of your app. In this case it's:
C:\Users\<Username>\Local\Packages\{Package-Name}\LocalState\
you can find your {Package-Name} by looking in the app manifest. It'll probably be a long string of numbers and letters by default.
I get this error no matter what version of SubSonic I use. When I query the database for data, it errors out, saying it can not connect to the database.
However, it is able to generate the .cs classes(ActiveRecord, Context, etc) when told to do so.
Any help is appreciated.
Thanks folks...
My guess is that you have your SubSonic generated classes in a separate project from where your main application is (in another project in the same solution). Your main application project references the project containg the SubSonic generated classes.
If this is the case, your main application project must also contain the connection string in a config file, similarly to what your other project has. You might also need to copy over some of the other SubSonic related items from your other project's config file as well.