Employee database script is not running in Mysql - mysql-workbench

I am new to the mysql , I downloaded the employee database zip file extracted it. Then I run the script file but its always giving me error that this file is already being used.
Here's a snap of error.
MySQL Workbench
Run SQL Script
[WinError 32] The process cannot access the file because it is being used by another process:
'C:\Users\Kushagra\AppData\...\tmpd26qry86,cnf'
Can someone please explain how to solve the issue? Is there any another way to import ?
I'm using
MySQL Shell 8.0.25
MySQL Workbench 8.0 CE

Can you check the background process of MySQL using task manager? It may acquire the process and preventing the script from execution.

After finding a lot of solutions and none seemed to affect I downgraded my MySQL workbench version.
Initial version : 8.0.25
Downgraded version (worked fine) : 8.0.20

Related

Connect Postman to Postgres

There is a problem.
I need to access Postgres Database from Postman. Database isn't local, it is on a server, but I have full connection string (host, db_name, user_name/password, scheme).
Any chances to do it?
I tried PostgREST, but I can't install it. I have LIBPQ.dll is not found error. I installed it but it was no help, I still have 0xc00007b error.
So that I can't install PostgREST.
Should I install it on the server where DB is located?
And is there any other way?
update: I managed to overcome all the errors (here is the note how to overcome 0xc00007b error: https://postgrest.org/en/stable/install.html).
Now I can call postgrest from cmd with the flag --help, but it's still not connected to the database.
update2: I managed the connection by putting postgrest.conf filled file in the same directory as postgrest.exe file and running in from cmd.
search for app and browser control in start menu, then select exploitation control :
set randomize image ASLR to off

pgadmin4 command keep running and process watcher won't go away

I was trying to follow the instructions from postgresqltutorial to load a sample database into postgresql using pgadmin. But after the database was restored(since I can query data from the database), the process watcher just won't go away, and it keeps saying that the command is "running"(as of this writing, it has been running for over 400 thousands seconds, but the size of the sample database is just a few megabytes). Reboot and reinstallation couldn't fix the problem.
Here are some screen shots:
And when I click "click here for details":
I am using postgresql 9.6 with pgadmin4 on windows 10. So what's going on here? Is it a bug? How can I get rid of the process watcher?
I had the same issue with posgresql 9.5 and pgAdmin4 on Windows 7. I solved it without loosing server list by opening %APPDATA%\pgAdmin\pgadmin4.db file with SQLite Manager (Firefox Add-on) and deleting all entries from the 'process' table.
This is a bug in pgAdmin4 & reported,
https://redmine.postgresql.org/issues/1679
close pgAdmin, restart the system, open %APPDATA% and erase the folder pgAdmin and the pgAdmin is Ready to start without errors.
Greetings

Anyone using hadoop_fdw with cloudera 5.2.0?

After painful installation of hadoop_fdw into our running pgsql 9.3.4, I am trying to connect it to cloudera cluster 5.2.0 with no luck.
Is there a way of debugging the fdw? After creating the foreign table and selecting from it, I just got an error - ERROR: failed to connect to Hive: No more data to read.
btw.: Some old version of hadoop_fdw was capable of using url (jdbc://server:port/args), but not the recent version, there's just address & port.
Hadoop_fdw didn'd make it. There's probably something wrong/old/obsolete in hive.c. But with even more effort we managed to make jdbc_fdw work with cloudera jdbc drivers. The steps were as follows:
1) install jdbc_fdw extension
2) merge all driver jar files into one
3) CREATE SERVER cloudera2 FOREIGN DATA WRAPPER jdbc_fdw OPTIONS(drivername 'com.cloudera.hive.jdbc4.HS2Driver',url 'jdbc:hive2://fqdn:10000;user=hive',querytimeout '15', jarfile '/opt/cloudera/combined.jar');
mental note: set client_min_messages to debug5; can help you identify where is the problem e.g.:driver not found etc

Firebird FreeAdHoc UDF not working after restore on another server

I'm encountering a weird problem after I restored Firebird database. Production database (Firebird 2.1) runs on 64bit server and we're using FreeAdHoc library with extra functions. I've backed up production database with gbak, moved to local machine (64bit Ubuntu 13.10). Installed firebird 2.1.5 locally and downloaded latest FreeAdHoc library.
Now when I try to execute some function from it via iSQL:
/opt/firebird/bin/isql db.fdb -user sysdba -password masterkey -i /opt/firebird/bin/command.sql
and the content of command.sql is
select f_addday(current_timestamp,10) from rdb$database;
it runs properly and executes that UDF function.
HOWEVER, when I try to execute the same command via Flamerobin or PHP script, I get this error:
Engine Code : 335544343
Engine Message :
invalid request BLR at offset 59
function F_ADDDAY is not defined
module name or entrypoint could not be found
Can someone advise? I think that the fact that isql executes and flamerobin/php doesn't is a good lead but I lack an experience to figure out why it could be the case.
Thanks, Michal

PostgreSQL issue: could not access file "$libdir/plpgsql": No such file or directory

I get this exception in PostgreSQL:
org.postgresql.util.PSQLException: ERROR: could not access file "$libdir/plpgsql": No such file or directory
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1721)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1489)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:236)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
I searched a lot and most solution points to a wrong installation. But this is my test db which has been running without issues for a long time. Also inserts are working. Issue occurs only on select queries.
Apparently, you moved your PostgreSQL lib directory out of place. To confirm this, try the following in psql:
> SET client_encoding TO iso88591;
ERROR: could not access file "$libdir/utf8_and_iso8859_1": No such file or directory
If you get an error message like this, then my theory is correct. You'll need to find out where those files ended up, or you can reinstall PostgreSQL to restore them.
To find out what $libdir is referring to, run the following command:
pg_config --pkglibdir
For me, this produces:
/usr/lib/postgresql
I have the same problem: the other postgres server instance (8.4) was interfering with the 9.1 one; when the 8.4 instance is removed it works.
the other instance can sometimes be removed from the system while still running (e.g. you do a gentoo update and a depclean without stopping and migrating your data). so the error seems particularly mysterious.
the solution is usually going to be doing a slot install/eselect of the old version (in gentoo terms, or simply downgrading on other distros), running its pg_dumpall, and then uninstalling/reinstalling the new version and importing the data.
this worked pretty painlessly for me