I am unable to connect http://localhost/phpmyadmin by using jmeter... i have placed mysql-connector-java-5.1.44-bin in lib folder of jmeter directory...
I am using WAMP Server
Error: Cannot create PoolableConnectionFactory (Unknown database 'phpmyadmin/')
Connection settings are as follows:
DB URL: jdbc:mysql://localhost/phpmyadmin/
JDBC Driver class: com.mysql.jdbc.Driver
Username:root
password:
It's not clear what you are trying to achieve, but you are surely confusing 2 things:
phpmyadmin is a web application. If your goal is to test that web application, you should be using HTTP Sampler. You cannot test web application using JDBC sampler.
If you want to test a database on your My SQL instance using JDBC sampler, you have to provide a name of valid database just as an error says. Typically instance of MySQL comes with a bunch of system databases, so you can use one of them, for example:
DB URL: jdbc:mysql://localhost/test
should work, since MySQL typically comes with test database pre-installed. Or you can create your own database and provide its name there.
If you want to load test phpMyAdmin web interface - remove JDBC Request sampler and switch to HTTP Request Sampler. Most probably you will also need to add a HTTP Authorization Manager configured to send the relevant credentials (default username is root with blank password, if it doesn't fit you can reset the password). See How to Use HTTP Basic Authentication in JMeter article for example Test Plan for logging into phpMyAdmin web interface
If you would like to continue playing with the JDBC Request sampler, the error you are getting states that phpmyadmin database is missing, you will need to create this database prior to attempting connecting to it using JMeter
Related
I'm running gcr.io/cloud-spanner-emulator/emulator in a Docker container on my dev machine. I would like to connect to the database from the Intellij Database Navigator so that I can see what data was written to my tables.
In Database Navigator, I have created a new Generic connection and configured it to make use of the google-cloud-spanner-jdbc driver (version 1.17.3, obtained from maven), using the connection string
jdbc:cloudspanner://localhost:9010/projects/my-project/instances/my-instance/databases/main;usePlainText=true
as documented here, but with the correct project, instance, and database name subbed in. Crucially, I have included the usePlainText=true parameter as documented in this question.
When I test the connection, I get an error message that says
Cannot connect to "Spanner Localstack". INVALID_ARGUMENT: Invalid properties found in connection URI: v$session.program, ApplicationName
Has anybody successfully connected Intellij's Database Navigator to the cloud-spanner-emulator using the google-cloud-spanner-jdbc driver?
Your setup and JDBC URL all seem to be ok. The problem is caused by the following combination that is out of your control:
Database Navigator automatically add this to the connection properties: https://bitbucket.org/dancioca/dbn/src/d67a09f92b4b9f27e0d1feb91dada9bf0fe802eb/src/com/dci/intellij/dbn/connection/Connector.java?at=master#lines-92
The Cloud Spanner JDBC Driver checks that it only receives known properties: https://github.com/googleapis/java-spanner/blob/907ae1ff2f5c0b60510c435f5ba270bd92827104/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java#L602
As the Cloud Spanner JDBC driver does not know all the properties that Database Navigator is adding, it will refuse the connection. I'll have a look and see if we can get that fixed in the JDBC driver.
I am attempting to use Liquibase to deploy changes to SQL Server.
I have set up the sqljdbc jar file and placed it in my local maven repository. I then attempt to use the liquibase-maven-plugin to run the changes placed in the changelog for the given connection URL.
Here is what my connection URL is: jdbc:sqlserver://localhost:1433;user=Jenkins_BuildServices;password=hi;
I already created the login on my localhost and gave it sysadmin privileges. I also have made sure that the properties -> security is set to both SQL Server and Windows Authentication mode. Any ideas as to why the url being passed in is giving me back this error and not reading it from the URL?
Is there any way to capture SQL queries transmitted by old application
created in Delphi/C++Builder + Firebird?
I don't have source code of that client app or access to (remote) database server.
Firebird 2.5 added the trace API which can be used to track prepare and execution of statements and a number of other things. The tools included in Firebird for use of the trace API are rather basic, but it might well be sufficient for your needs. Be aware that by default the trace API limits the size of statements captured and logged, and it might take some time to tweak the trace configuration to get all information you need.
An example configuration is:
<database mydatabase.fdb>
enabled true
log_statement_prepare true
time_threshold 0
max_sql_length 65536
</database>
This should capture all statement prepares with the full SQL query in the database mydatabase.fdb.
See for more information: Audit and Trace Services in Firebird 2.5.
There are several vendors who provide tools that utilize the trace API (for example FB Tracemanager by Upscene Productions), and as already mentioned in the comments, there is also FBScanner by IBSurgeon which acts as a proxy between the client and a Firebird server and allows you to record the traffic (including statements).
Firebird includes a utility fbtracemgr.exe that can be used for tracing. Here's a sample command line:
cd "C:\Program Files\Firebird\Firebird_3_0"
fbtracemgr -start -service localhost/3050:service_mgr -config c:\temp\fb-trace.config -user sysdba -password <secret> >c:\temp\fb-trace.log
Discussion of parameters:
The -start parameter instructs the tool to start a trace session. There are other parameters, just run fbtracemgr.exe without any arguments to see a list of possible parameters.
The -service parameter tells the tool which service to trace. It is essential that you use the same connection method as the client that you want to monitor.
Let's say you use FlameRobin, in this case you probably have defined a database connection that uses TCP/IP and that connects to localhost and the default TCP port 3050. To match this you have to prefix the service name with "localhost/3050".
If you want to trace an isql.exe session, then you probably let isql.exe connect without using localhost. In this case you have to omit the "localhost/port" prefix and just specify -service service_mgr.
The -config parameter specifies the path where the config file is located that contains the settings to be used for this trace session. Tracing must be configured with settings that define all the details of the trace, including what to trace. The settings can only be specified in the form of a configuration file.
The Firebird engine performs tracing of its own - the System Audit session. For this purpose it includes a trace configuration file located in its program folder. Use this file as an inspiration/template. It contains many commented options explaining purpose and syntax of each option. Filesystem location: C:\Program Files\Firebird\Firebird_3_0\fbtrace.conf.
The -user and -password parameters are necessary only if you want to monitor a TCP/IP connection. If you want to monitor direct connections without authentication (e.g. isql.exe) then you can omit the credentials.
The user you specify for tracing must, obviously, have the rights to "spy" on the connection being traced.
The example uses "sysdba" which has of course all the rights. The user of the connection being traced should also be ok.
The last part of the command redirects output to a trace log file. This is optional, but you'll probably want to do this because can be lots of output. You can open the trace log file in a text editor such as Notepad++ which will alert you when new content is written to the file.
Sorry for necroposting :) but I had the same question. And now we have the trace/audit tool in IBExpert IDE. It can be found Services menu.
I have an issue with logging a Support user into an Application that has a SQL Server backend.
When configuring the application itself, the SQL set-up asked me to assign whether the Security to access the Application would be Windows Authentication or SQL: server Authentication, I chose Windows Authentication, and as I was using a login called
'LabUser1' I have been able to login to the application fine.
However, when I logon to the server using a different windows login, this time 'Support', SQL keeps giving me the error:
Error accessing the database DSN
Now I know the reason is because the install of SQL happened using the 'Labuser1' profile, but how can I create a script that will allow me to add the 'Support' user to the 'Allowed Logins' so that I can logon to the app server and at least open the Application? (I have seperate logins for when I see the applicatiojn login window, so please don't confuse the matter by thinking it is a simple case of creating a login for Support....I am talking about logging into the server)
The current batch file I am trying to run is:
sqlcmd -S localhost\OCDBB01 -i createSupportlogin.sql
Then I run this batch file after having created the following SQL script:
CREATE LOGIN OCDMW1\Support FROM WINDOWS
GO
Your description of the situation is a bit confusing to me however it appears that the "SQL setup" that is part of the application configuration created a ODBC DSN that uses the credentials of person logging into the machine as the login for SQL Server.
Simply creating a new (correct) login to the SQL instance may not resolve this issue since that does nothing to modify the DSN. If you are tied to using Window Authentication for SQL access it might be necessary to create multiple DSNs for the application to use and find a way to have the correct DSN associated to the right login for the application to use.
I have tried to follow the instructions in chapter 1 of the HSQLDB doc and started my server like:
java -cp hsqldb-2.2.5/hsqldb/lib/hsqldb.jar org.hsqldb.Server -database.0 file:#pathtodb# -dbname.0 xdb
and I have reason to believe that worked cause it said (among other things):
Database [index=0, id=0, db=file:#pathtodb#, alias=xdb] opened sucessfully in 2463 ms.
However at the next step I try to connect using SqlTool and based on chapter 8 of the documentation I came up with this command to connect:
java -jar hsqldb-2.2.5/hsqldb/lib/sqltool.jar localhost-sa
Which gives the following error:
Failed to get a connection to 'jdbc:hsqldb:hsql://localhost' as user "SA".
Cause: General error: database alias does not exist
while the server says:
[Server#60072ffb]: [Thread[HSQLDB Connection #4ceafb71,5,HSQLDB Connections #60072ffb]]: database alias= does not exist
I am at a loss. Should I specify alias when connecting somehow? What alias would my database have then? The server did not say anything about that...
(also, yes I have copied the sqltool.rc file to my home folder.
Your server has -dbname.0 xdb as the database alias. Therefore the connection URL should include xdb. For example jdbc:hsqldb:hsql://localhost/xdb
The server can serve several databases with different aliases. The URL without alias corresponds to a server command line that does not include the alias setting.
java -jar /hsqldb-2.3.2/hsqldb/lib/sqltool.jar --inlineRc=url=jdbc:hsqldb:localhost:3333/runtime,user=sa
Enter password for sa: as2dbadmin
SqlTool v. 5337.
JDBC Connection established to a HSQL Database Engine v. 2.3.2 database
This error has been hunting me for the last 5 hours.
Together with this stupid error: HSQL Driver not working?
If you want to run your hsqldb on your servlet with Apache Tomcat it is necessary that you CLOSE the runManagerSwing.bat. I know it sounds trivial but even if you create the desired database and you run Eclipse J22 Servlet with Tomcat afterwards, you will get a bunch of errors. So runManagerSwing.bat must be closed.
See my sqltool answer over on the question "How to see all the tables in an HSQLDB database". The critical piece is setting up your sqltool.rc correctly and putting it in the right location.
You can also use the following statement for getting a connection from a files based store. this can be used if you are running the application from Windows.
connection = DriverManager.getConnection("jdbc:hsqldb:file:///c:/hsqldb/mydb", "SA", "");