I have Liferay 6.2 and i want to connect with mysql database using eclipse IDE.How to connect them and what i have to use. Please give me any example for startup.
Follow the below steps->
Create a new liferay server (Point it to the liferay portal).
Start the server.
When the server will start hit the
localhost:8080.
A page will be displayed for the database
configuration and user configuration.
provide the db name and
usename and password.
Once you provide that, liferay will use
that database.(Obviously that DB should be in your database)
Else you can create a portal-setup-wizard.properties file in \liferay-portal-6.2.0-ce-ga1 directory. Then add the following entries.
admin.email.from.name=Test Test
jdbc.default.password=root
liferay.home=D:/5555555/liferay-portal-6.2.0-ce-ga1
admin.email.from.address=test#liferay.com
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.username=root
jdbc.default.url=jdbc:mysql://localhost/project_monitor_liferay?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
setup.wizard.enabled=false
Else you can follow the below link
http://www.liferaysavvy.com/2013/12/liferay-62-portal-development.html
Here step by step process has been given. If you find it helpful then mark the above as an answer, so that it would be helpful for other persons also.
To use service builder in portlet you can go through the following links..
Learn how to create a portlet and integrate services in it.
https://github.com/liferay/liferay-plugins/tree/master/portlets/sample-service-builder-portlet
http://www.liferaysavvy.com/2014/05/liferay-mvc-portlet-development-with.html
http://www.liferaysolution.com/2011/12/nice-video-tutorial-to-create-sample.html
http://innovationliferay.blogspot.in/p/service-builder-concept.html
Else you can download the liferay cookbook from
http://www.mpowerglobal.com/download-cookbook This book contains all your query. You just need to dig into it and find.
Related
I have an MVC 5 application that I first configured to use Mysql but now would like it to use SQL Server.
My app uses code first and migrations in order to generate the database.
After I changed all the required configuration I tried to run a Update-Database from the Package management console but I keep getting this error:
System.Data.Entity.Core.MetadataException: Schema specified is not
valid. Errors: (0,0) : error 0152: No Entity Framework provider found
for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient'.
Make sure the provider is registered in the 'entityFramework' section
of the application config file. See
http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
This error appears after the database is created. It also appears when I run the application since it checks at that moment if there is any migration to do.
Somehow it still tries to use MySQL even though all providers point to SQL Server.
Any help would be more than welcome.
Thanks in advance
You need to follow the below mentioned steps to overcome above issue.
Step 1 : Use NuGet package to remove and install the relevant packages.This is very important.
If it's not working after the above step then you have to follow the below mentioned steps.
Step 1 : Get a backup of your project and SQL db and keep it in a safe place.
Step 2 : After that you have to delete all your data migration scripts on your app.
Step 3 : Delete the SQL db also.
Step 4 : Recreate all your Migration scripts again and after that run those against the SQL server.
Note : You need to do above steps b'cos it seems EF keep the provider details on the db migration scripts.
I have been struggling to learn how the localhost MySQL and IntelliJ to connect and program a database related task. Is that Possible? If yes, how to achieve it?
Connecting to a local instance is essentially the same as connecting to a remote instance of MySQL. Just substitute either localhost, or 127.0.0.1 in place of the IP address you would use normally.
To add a new database connection (called a data source in IntelliJ), open the Database window View -> Tool Windows -> Databases, then click the + sign and select Data Source and then MySQL from the sub-menu. The defaults for the MySQL connection should for a local install of MySQL.
To open a connection, right click on your new data source and select Open Console.
Official IntelliJ Documentation - Managing Data Sources
As of Community version 2017.2, the DB Browser does not come bundled with the IDE (at least not on my last two installations). In order to activate it, you should navigate in the IDE in **File->Settings->Plugins->Browse repositories and select "Database" from the dropdown menu. From there you can install the Database Navigator. After the installation has been successful, you should restart the IDE. Then you can select **View->Tool windows->DB Browser.
In recent versions of Idea Community (about 2017.3, but I am not sure) there is no Database tool available anymore, only in Idea Ultimate [1]. Yet worse, the plugin Database Navigator that would fit here to solve this problem is not compatible anymore, at least not with 2018.3 [2].
Uninstalling Idea right now, unfortunately.
[1] https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000411990-Database-option-not-available-under-View-Tool-Windows-in-Intellij-v2018-1-Community-Edition-
[2] https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001759260-Dan-Cioacas-Database-Navigator-plugin-v3-0-8222-0-is-incompatible-with-latest-IntelliJ-IDEA-2018-3
To add a new database connection (called a data source in IntelliJ), open the Database window View -> Tool Windows -> Databases, then click the + sign and select Data Source and then MySQL from the sub-menu. The defaults for the MySQL connection should for a local install of MySQL.
To open a connection, right click on your new data source and select Open Console.
to download Drivers click on "Download missing Drivers" in bottom of the window.
if you want to add JDBC and connect other database vendor like workbench projects (instead of using intelliJ Consol) just follow the steps bellow :
Using JDBC drivers #
Create a connection to a database with a JDBC driver #
If you cannot find a name of a database vendor in the list of data sources, download a JDBC driver for the database management system (DBMS), and create a connection in IntelliJ IDEA. With the JDBC driver, you can connect to DBMS and start working.
In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon.
In the Data Sources and Drivers dialog, click the Add icon (+) and select Driver and Data Source.
Click the User Driver link.
In the Driver files pane, click the Add icon and select Custom JARs.
Navigate to the JAR file of the JDBC driver, select it, and click
OK.
In the Class field, specify the value that you want to use for the
driver.
Click Apply.
Return to the created data source connection.
Specify database connection details. Alternatively, paste the JDBC URL in the URL field.
To set an empty password, right-click the Password field and select Set empty.
To ensure that the connection to the data source is successful,
click Test Connection.
For more information read the official answer of Jetbrains in following link :
Configuring database connections
https://www.jetbrains.com/help/idea/configuring-database-connections.html#Configuring_database_connections.xml
For anyone who is having trouble connecting IntelliJ Community Edition with MySQL in 2021.
(In IntelliJ Ultimate Database connectivity is supported by default and you can follow the steps shown in the previous answers. However IntelliJ Community Edition does not support it by Default).
Here is what you have to do:
Install "Database Navigator" Plugin. (Settings->Plugins->Marketplace->Search Database
Navigator and install)
Open DB Browser Tab (next to the button that opens/closes Project Window) -> Click Options logo
-> '+' -> Fill the Database fields (Name, host, Port, DB Name, User and Password).
Download the MySQL Java Connector
by searching google for 'java connector mysql'.
Go to File->
Project Structure -> Modules-> Dependencies. Click the '+' on the right side and select 'JARs or directories'.
Navigate and find the Java connector you just downloaded (the file
looks like this: mysql-connector-java-8.0.26.jar). Click apply
and in the project window, under External Libraries, you will see
the .jar file.
For WebStorm you need plugin "database-navigator"
https://plugins.jetbrains.com/plugin/1800-database-navigator
I am using the Laravel framework for a project hosted on cloudcontrol.com and would like to connect to a MySQLd instance on cloudcontrol.com.
How can I configure DB access in Laravel? Unfortunately I could not find any documentation for this framework.
Since Laravel uses PHP for it's configuration, you can simply follow the example from our documentation to read the credentials from the environment. Simply adjust app/config/database.php accordingly.
https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-on-credentials
You can configure database settings in app/config/database.php.
I use NETBeans IDE. I want to use JDBC with MySQL. I have downloaded and installed mySQL 5.5 but I don't know how to use mySQL with NETBeans. How can I do that.
Here is a very good video tutorial form which you can eaisly learn that How to integrate mySQL with netbeans.Also see this for step by step (with pictures) integrationAnd to setup a mySQL server you need to see this
Take a look at the Netbeans documentation that demonstrates how to set up a connection to a MySQL database from the NetBeans IDE. Take a look at the the section: Configuring MySQL Server Properties
Please see the tutorial below:
https://netbeans.org/kb/docs/ide/mysql.html
#xxlali
click services under the window tab in the ide.
right click the database and click new connection
Add mysql in the driver
click 'Next'
type username and password and click test connection.
Finish once the connection is succeded.
I am running MySQL db using the latest wamp server. Using Oracle JDeveloper 11g. I have placed the MySQL connector jar in .../jdeveloper/jdev/lib folder and added the jar as a library in my adf application .
. I am able to create a connection to the db, view the tables in DB Navigator of JDev, also create Entity and View Objects. However when I try to run the Application Module, I get an error popup saying could not create connection, driver not found. I have the ApplicationModule data source configuration set to JDBC Datasource.
Help!!!
. Thank you
Update :
The Error Log-----------------------------
[232] Using the oracle.jbo.server.ConnectionPoolDataSource to acquire a connection...
[233] Creating a new pool resource
[234] Trying connection/3: url='jdbc:mysql:/*****' user='root' password='*****' ...
[235] DBTransactionImpl.initTransaction: Login failed
[236] java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/myDatabase
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:187)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
The username and password used to connect to my database is correct, I am able to test it in the connection manager.
I am getting this error on run of Application Module, so I dont think the Integrated Weblogic Server is an issue here.
I have made sure that in libraries the mysql-connector jar is marked as "Deploy by default".
The jdbc jar file should also be placed where the embedded WebLogic can find it. So locate your defaultDomain directory under the JDeveloper's system directory /users/youruser/roaming/app data/JDeveloper
And locate the lib directory there.
Or make sure that the library you created in JDeveloper for the JDBC jar is marked as "Deploy by default".
put the mysql-connector**.jar in ~/.jdeveloper/xxxxxxx/DefaultDomain/lib
Configure JDeveloper to work with MySQL Connector/J
1-Download MySQL Connector/J 3.0.11 and copy the JDBC driver JAR file to a known location, such as /jdev/lib
From the Tools menu, select Default Project Properties.
In the tree view, select Libraries.
In the right pane, select New. The Create Library dialog will be displayed.
Name the library MySQL JDBC.
Set the location to Users Libraries.
Click Edit for the Class Path. The Edit Class Path dialog is displayed.
Click Add Entry. The Select Path Entry dialog is displayed.
Navigate to the JAR file for the MySQL Connect/J JDBC driver (it should be called something like mysql-connector-java--bin.jar).
Click on the jar file and click Select.
Click OK.
The library will be defined, and it will be in the Selected Libraries list.
You probably don't want that library to be defined in all your projects, so shuttle it over to the Available Libraries list.
this link help me a lot :
Oracle JDeveloper 11g with MySQL