ANM - mysql create other databases
Hi,
I have ANM 4.3 installed and running (demo licese expired, but we are getting a new license).
It worked without problems. I could log, create new users, monitoring, deploy....
I need to install a softwar that needs a MySQL database.
Is it possible to use same MySQL that is installed by ANM with other programs?
I'm trying to log on MySQL server, but it always give this message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Does anyone know how to solve this issue and if it's possible to use same MySQL that is instaled by ANM to run other applications?
Thanks for help.
Igor Max
Hi Igor,
Installing other software in the same server as ANM is not supported, specially if it also uses a MySQL database (which would for sure end up causing issues).
Regards
Daniel
Similar Messages
-
I am trying to create a mySQL DB through JSP program (query).
The Query :
stmt.executeUpdate("CREATE DATABASE employee;");
is not working. PLEASE HELP ME.................
The program is as follows.
try
Connection con =null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","");
System.out.println("Connection Established");
try {
System.out.println("Entered Try Block");
stmt=con.createStatement();
stmt.executeUpdate("CREATE DATABASE employee;");
System.out.println("Query Executed");
catch(Exception e){
System.out.println("Entered Catch Block");
System.out.println("Query Skipped");
catch (SQLException ex)
while (ex != null){
System.out.println("sql exception"+ex);
ex = ex.getNextException ();
Message was edited by:
sam_johncon=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","");
Access denied for user: '[email protected]' (Using password: NO)
You must provide a password for your connection.
Your code should have been as follows:
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","YOUR_PASSWORD_HERE");Anyway, to create a database or a table in a db server like MySQL, you must have the good privileges to.
Go to <MySQL_INSTALL_DIR>/Docs/ directory, you'll find there the MySQL manual.chm. Take a look at the the Tutorial section.
In order to know how to use jdbc Connector/J, take a look at the documentation shipped with: /mysql-connector-java-X.X.X/docs/connector-j.html
Here a typical code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class TestMySQL {
public static void main(String[] args) {
Connection con = null;
Statement stmt = null;
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock", "Dude", "YOUR_PASSWORD_HERE");////// put the right password here
System.out.println("Connection Established");
System.out.println("Entered Try Block");
stmt = con.createStatement();
stmt.executeUpdate("CREATE DATABASE employee");
System.out.println("Query Executed");
} catch (Exception e) {
e.printStackTrace();
} finally {
if (stmt != null) {
try {
stmt.close();
} catch (Exception e) {
if (con != null) {
try {
con.close();
} catch (Exception e) {
}Hope That Helps -
Create a Database Link from Oracle to MYSQL on windows
Hi
I need to create a database link from oracle to mysql database on windows to fetch some records.Can anyone help me on this?Search for Transparent Gateways, Heterogeneous Services...
The Oracle SQL Developer have drivers to Access, MySQL and SQL Server. -
Trouble creating a database in MySQL using java
Hi all,
I am trying to create a program that connects to MySQL and can create databases, tables etc. I can connect to MySQL using the program but I cannot create a database (however if i create the database with the command line i can create tables in the database).
When I try to create a database i get the error
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'persondatabase'Here is the code:
import java.sql.*;
class Connect {
public Connect() {
public Connection connectToMySQL(String database_name) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///persondatabase", "", "");
catch(ClassNotFoundException e) { System.out.println(e); }
catch(InstantiationException e) { System.out.println(e); }
catch(SQLException e) { System.out.println(e); }
finally {
return con;
public void createDatabase(String database_name) {
Connection con = null;
Statement stmt = null;
try {
con = connectToMySQL(null); //connect to mysql but not to any one databases
con.setAutoCommit(false);
if(!con.isClosed())
System.out.println("Connected to MySQL. Creating the Database " + database_name);
String str = "CREATE DATABASE " + database_name;
stmt = con.createStatement();
stmt.executeUpdate(str);
con.commit();
catch (Exception e2) { }
finally {
try {
stmt.close();
con.close();
}catch (Exception e3) { }
public void createPersonDetailsTable(String database_name, String table_name) {
Connection con = null;
Statement stmt = null;
try {
con = connectToMySQL(database_name);
con.setAutoCommit(false);
if(!con.isClosed())
System.out.println("Connected to " + database_name + " creating the table " + table_name);
String str = "CREATE TABLE " + table_name + "(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(25), last_name VARCHAR(25), address VARCHAR(40), suburb VARCHAR(20), state VARCHAR(3), post_code INT(1), contact_number INT(10), email_address VARCHAR(40));";
stmt = con.createStatement();
stmt.executeUpdate(str);
con.commit();
catch (Exception e2) { System.out.println(e2); }
finally {
try {
stmt.close();
con.close();
}catch (Exception e3) { }
}I am wondering if anyone can see where im going wrong? I am currently connecting with an anon account to MySQL.
Here is the program I am using to test the above:
class ConnectionTester {
public ConnectionTester() {
Connect s = new Connect();
s.createDatabase("PersonDatabase"); //this throws the error
//s.createPersonDetailsTable("PersonDatabase", "PersonDetails");
public static void main(String[] arg) {
ConnectionTester start = new ConnectionTester();
}you should rethink whether you need to create a database using java. personally i think it's a bad idea. your database should exist and the schema should be ready to go when your app starts. why do you think you need to create one?
% -
How to use MySQL to create a database
I downloaded MySQL and opened the folder and saw a plethora of files. I'm lost and don't know where to start. I want to create a database. Any suggestions? I have dreamweaver cs5. My computer is a mac book pro OS10.6.8.
To amplify osgood_'s excllent suggestions - MySQL is a database application that runs, typically, in a server environment. Full stop.
This is not a simple "install the app and everything's good" type of program. Please do more research before attempting to install it. Also understand the security implications of running a database on a server (or even locally) and learn how to lock it down. Finally, to install and run MySQL locally, you better get really good with Terminal.app and learn how to launch MySQL and configure it from the command line.
I personally use MAMP (Mac Apache MySQL and PHP - see http://www.mamp.info/) to do MySQL/PHP development and testing as it doesn't mess with the internals of my machine, keeps everything in a MAMP folder in my Applications folder, and it has a control panel for easy start/stop of Apache/MySQL services.
Not trying to squash your dreams of running MySQL locally but you do need more "domain" knowledge before doing so.
Hope this helps. -
Creating table in other databases than Oracle
Hi
It would be nice to be able to create tables in a JDBC Connection in other databases than Oracle. Why limit it to Oracle when there is a SQL standard to work with?
Regards,
FredrikGeneric SQL isn't really as generic as people would like to believe.
In any case, we're working on that for an upcomming release, but with the current time constraints, we just got the Oracle table creation support done.
(The time is more on testing than writing the feature)
It'll get in there, but probably not in the next release.
Rob -
Create a database link to access SqlServer 2005 view from oracle 11gr2
Hi All,
Greetings for the day.
Though I have seen quite a few posts but just wanted to cross-verfiy and double check hence posting.
Oracle Database : 11gr2
OS :SOLARIS SPARC 64 Bit
SQL Server Database : Sql Server 2005
OS : Windows 2003 32 Bit
The requirement is to access a view residing in the SQL Server 2005 Database using the Oracle Database. This involves creation of a Database link in the Oracle Database to access the SQL Server.
Can you suggest which approach should i follow ( I am able to understand that both do the same job ):
How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) post install [ID 562509.1]or
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install [ID 561033.1]Will they do the same job ? And can they be used on any OS and version of the SQL Server Database as version information for SQL Server is not specified anywhere?
Please let me know so that I can it forward with Business for approvals and budgetting.
Regards
KKYour question is similar to the post: Oracle 11gr2 connection to Sql Server using dg4msql problem
Please visit: http://stackoverflow.com/questions/4658942/oracle-11gr2-connection-to-sql-server-using-dg4msql-problem
Answer on the website:
You seem to be using the Gateway for MySQL set-up rather than the Heterogeneous Gateway (for ODBC connections). Here is an overview of the process
On SQL Server create a database user and give it read access to the database/tables you want to read via the Oracle database link.
In the gateway home each SQL Server database you want to access should have an init.ora located in $OH/dg4msql/admin in the form initsid.ora where sid is the name of the database to be used in the link (e.g. initbob.ora), so create one
HS_FDS_CONNECT_INFO=msserver1:1234//Example_Database
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_TRANSACTION_MODEL=READ_ONLY
You must now add the new sid to the listener.ora in the gateway home using an additional SID_DESC section inside the existing SID_LIST, for example
(SID_DESC =
(SID_NAME=bob)
(ORACLE_HOME=/oracle/gateway/product/11.2.0)
(ENVS=LD_LIBRARY_PATH=/oracle/gateway/product/11.2.0/dg4msql/driver/lib;/oracle/gateway/product/11.2.0/lib)
(PROGRAM=dg4msql)
You should now stop and restart the gateway listener so that the new sid becomes active. NB a reload is not enough.
You must now add the new sid in the tnsnames.ora file for the listener of each database in which you will create a link. You don't need to do this in the gateway home unless it is also a database home in which you will create a database link.
bob =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = severname.example.com)(PORT = 1690))
(CONNECT_DATA = (SID = bob))
(HS = OK)
NB: The host and port are for the gateway not for the SQL Server database
In each database that requires a link to the MS-SQL database you should create a database link to your new gateway sid.
CREATE PUBLIC DATABASE LINK bob
CONNECT TO "ms_user" IDENTIFIED BY "ms-passwd" USING 'bob';
where ms-user and ms-password are the SQL Server user you created right at the start.
Now you can test the new database link
SELECT COUNT(*) FROM "Table_Name"@bob;
Once you have this working you can alter the initsid.ora file to add parameters to suit your connection. If you do it this way you can easily add and manage many different databases via the gateway.
Hip
Edited by: 1000595 on 04:58 17-04-2013 -
What is the best way to create a database schema from XML
What is the best way to create a database schema from XML?
i have a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
Taking my C# furtherHi Saythj,
When mentioning "a database schema from XML", do you mean the
XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
Create an XML Schema Collection basing on your complex XML, you can find
many generating tools online to do that.
Create a Table with the above created schema typed XML column as below.
CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
How to create a database using Java?
Hi there..
I'm a student who is currently studying IT and was asked to do a project based on database but create using Java.. since i'm a beginner..i was wondering whether is it possible to do that?
and if it is possible.. can you kindly show me a sample of code on how to start the project...
thank you
yours sincerely,
ShafiniWhile duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
See http://hsqldb.org/
I've not used it yet (but soon though), and I can't really advise anyone about it.
However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing. -
Which Is Better:Create The Database Manually Or As a Part Of Your Code?
hi everybody
i just want to know people when you creating a JDBC Application
and introduce the program to the user to deal with
do you create the database through the database client like phpmyadmin for mysql
or by using query in your program?if so when you use the query in your flow of code?
or you restore an empty database backup file enclosed in the setup directory?
i just want to know what is the best design way when creating the database on the end user machine?First_knight wrote:
and how do you deal with user installing new operating system,or formatting the hard disk?
you tell him to take backup of the database then restore it again,right?yes. How else is he going to preserve his data?
sheesh...
In real applications the database is just about always maintained separately from the application and contains a lot of logic and structures that you can't create using Hibernate, JPA, or whatever.
It's also almost always a database that's been in existence for a long time, well before you ever were asked to write that Java application to talk to it.
Autogeneration of tables is nice for rapid prototyping or for demo purposes where it allows you to install the application more easily, but that's about it. -
MySQL + apache2 + PHP Database connection error
Hi Folks:
I am trying to connect to the database and keep getting a 500
internal server error. here is the setup
Database server -- mysql 4.1 (linux) on a gentoo linux server
-- IP 192.168.0.10 -- srvdb-01
Webserver - Apache2 + PHP 5 on Gentoo Linux server
192.168.0.29 - srvweb-03
I have all the connections ready to go, dav is moving files
etc, but when i try to create a database connection, i keep getting
the following error
> PROPFIND /_mmServerScripts HTTP/1.1
> Authorization: Basic dGhvbG1lczp0eXBob29u
> User-Agent: Contribute/3.0
> Host: inventory.mcaschool.net
> Pragma: no-cache
> Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*
> MIME-Version: 1.0
> Content-Type: text/xml
> Content-Length: 134
> Depth: 0
> Connection: Keep-Alive
< HTTP/1.1 500 Internal Server Error
< Date: Tue, 25 Apr 2006 21:09:54 GMT
< Server: Apache
< Content-Length: 607
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
(copied from the DW8 FTP LOG)
I am really baffled by this problem -- can someone please
point me in the direction of a solution?
thanks
Tim Holmes
IT MANAGER - Medina Christian AcademyDJtonyF wrote:
> ... the issue isnt with godaddy.com the issue is with
dreamweaver. the "localhost" connection i attemped to connect to
was one on my own server i setup on my computer.
How have you set up your Testing Server in the site
definition?
If your server root is C:\htdocs, and your site is in
C:\htdocs\mysite,
that's the value for "Testing server folder". The URL prefix
should be
http://localhost/mysite/.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Oracle 64bit to MySQL (OS 64bit) - Database Link
My task is to create a database link from Oracle to MySQL.
My current setup is:
Windows Server 2008 - 64bit
Oracle 10.2.0.4.0 - 64bit
MySQL 5.0.45-community-nt
On my server I have installed the mysql odbc driver 64bit (5.6).
However, this driver only appears in the system32 of the odbcad32.exe and NOT in the syswow64.
How is that? I realize the problem might be here since Oracle (a 64bit application) looks for an odbc from a 64bit driver. This is not found since the mysql driver doesnt exist in the odbcad32.exe of syswow64.
I have followed the step by step setup procedure from this Connecting Oracle with MS-Access | Oracle FAQ but used the above driver and odbc accordingly.
After creating the database link on oracle I execute a select statement and this is the message I get:
ERROR at line 2: ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535 ORA-02063: preceding 2 lines from MYSQL_DB
MYSQL_DB is the database link created in Oracle.
Any ideas? Is this possible? Are there any alternative ways?
Thank you,
AndreasThe error message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}" is self explainind - DG4ODBC is not able to find the ODBC DSN you created.
In your gateway init file you configured the DSN: HS_FDS_CONNECT_INFO = testmysql
And according to the Windows ODBC Admin screenshot you created a DSN called testmysql - unfortunately you created it as a USER DSN. But DG4ODBC needs a SYSTEM DSN. The reasin why it needs a system DSN is that by default the Oracle listener is running in the local system account. So when you create an ODBC USER DSN it can be access by the user who created it, but nobody else can use it - also not the local system account which is serving the Oracle listener. So you need to create a system DSN that every user on this machine can use the DSN (including the local system account) .
- Klaus -
How to create a Database programatically?
Hi,
I couldnt not find the words to describe the below question in short for the title:
I am working on a Java application that runs of a JDBC database.
I need to be able to create a new database if the application is run on the system for the first time.
Without the user having to go through the JDBC registering any databases through jdbcad32
No mysql servers available to the user either.
Any suggestions welcome.
Thanks in advanceRuski wrote:
Hi,
I couldnt not find the words to describe the below question in short for the title:
I am working on a Java application that runs of a JDBC database.
I need to be able to create a new database if the application is run on the system for the first time.
Without the user having to go through the JDBC registering any databases through jdbcad32
No mysql servers available to the user either.
Any suggestions welcome.Depends on the application and database.
Pointless if the database is something like Oracle/MS SQL Server/DB2. Not to mention annoying and probably a negative in sales since DBAs in those cases will want to control their own systems.
Also pointless with other databases as well such as MySQL, Postgres. Those must be installed anyways. And if you are not providing an installer then why not just provide a script (since they must be profficient anyways.) And if you are providing an installer then why not just make it as a script?
Smaller solutions such as MS Access, then
1. Create the original database.
2. Deliver it as a 'blank' with the application.
3. When 'installing' copy the 'blank' to the 'real' location.
A true embedded solution can probably be done via the above. That would probably still be my solution. However in a case like that a separate application can be constructed to create the actual database. (File based obviously.) -
SAP Communicate with other database for simultanious Backup
Hi,
I have to write a program or function module in abap which should be called everytime whenever SAP executes an insert/update/ delete/modify statement. Or I can say when ever it changes any table contents.
The scenario is : I have created a replica of the database tables in different database running on different host machine. That database can be oracle or MySql. What I need is whenever somebody executes the project I need what ever data in table is getting inserted i need to copy the same data and place in other database .
Any Help how to do it..
Regards
Anand SagarHi Bala,
I want it to be in different database which SAP is not configured with, but called for specific tables only.
I want synchronous update in another attached database. To tell you in figure what I actually need is
SAP - - - - - - MySQL/ Oracle
SAP DB
Everything synchronous.. SAP responsibility to update the SAP database, I need when ever it tries to update the SAP DB specific tables I want synchronous update on MySQL/ Oracle . these are not configured with SAP. May I write a program calling SAP which will call whenever SAP goes for insert/update/delete and how...? -
MySQL - importing excel database
Hello,
When I try to import a excel database file into SQL I keep
gettng a #1046 Syntax error. Can someone help explain how to fix
this. Does this mean that the field names in excel are not
understood by SQL? If so, how do you get the data in there.
I go into MYPHPAdmin - create new database name - then try to
import from excel and I get the above error??
Thanks,
DennisI'll second the recommendation for Navicat. Yes, it's $99,
but it's saved my
butt a lot. I recently had a client during the election who
was adding
candidate endorsements to their db a few times a week. Five
minutes to add
their Excel spreadsheet each time. And making changes was a
breeze. I don't
touch MyPHPAdmin anymore.
MD
Lawrence *Adobe Community Expert* wrote:
> I've run into import problems with MyPHPAdmin before. It
seem sort of
> random in that most times it's okay, but sometimes
not... Just not
> 100% reliable. I've had far better success using
Navicat. Yes it
> costs a few bucks, about $90, but it's very well worth
it.
> Considering the time I used to spend occasionally trying
to figure
> out what MyPHP Admin didn't like, Navicat has paid for
itself many
> times over!
> Not a direct answer to your problem, but a good
suggestion none the
> less.
>
> "carbiz" <[email protected]> wrote in
message
> news:ggbqf8$ivi$[email protected]..
>> here is the error message I am getting=
>> SQL query:
>>
>> Part12345, Garmin, 129
>>
>> MySQL said: Documentation
>> #1064 - You have an error in your SQL syntax; check
the manual that
>> corresponds to your MySQL server version for the
right syntax to use
>> near 'Part12345,Garmin,129' at line 1
Maybe you are looking for
-
Exporting and Importing Data of Application Log
Hello, We do migrate an application from SAP System A to SAP System B. Despite the application logic, we do need to migrate some data, too. For this we do write an export report in System A that writes the data of some tables to files on the app ser
-
Disable a button under certain circumstances and disable input fields
Scenario: My user receives a PDF (dymanic XML) where they fill in fields and click a Submit button to send the data to the server. They receive a confirmation copy of the form back. In our older version of Livecycle, the confirmation form was locked
-
i create a program in my database and i want that no one see it source code even DBA and my BOSS how i can do this kuljeet pal singh
-
Problem seems to be in computer, sometimes iPod can't be written to, etc.
This is an ongoing saga. When I plug my iPod into the front USB port of my G5 and try to drag anything new into it I am told that it cannot be read from or written to. If I plug into the back USB port it let's me add a few songs then I get the same m
-
Mail addresses deleted with 10.7.4 update
The 10.7.4 deleted my address book contacts. I have Time Machine, but don't know how I can use this to restore my contacts. Any help?