HI we are using Adminer 4.3.1.
We choose system sqlite3 + localhost + location to DB file.
The error is not clear. I understood SQlite is supported. And I am directed to hardcoding functions to login. Don't I just need to use the form?
In short: how does one connect to a SQlite3 file using Admin?
Helpt appreciated ;)
I have the same issue, it does look like SQLite is broken in 4.3.1 because it is fixed in 4.3.2-dev, interestingly the login form has fewer options when SQLite is selected.
You can get the latest version by cloning the github repo and running adminer/sqlite.php
Related
First of all, I realize similar questions have been asked but none of them seem to have the same problem and I can't find a solution.
I can create tables and do write/read operations perfectly well within python accessing my SQLlite database. However, when trying to access the database through dbeaver I get the following issues:
First, when trying to connect to the db file, it asks me "A file named database.db already exists. Do you want to replace it?"
When trying to look at the tables via GUI it loads for a couple of seconds before showing an error
I have not found a way to solve this issue. Has anyone experience with this and a solution?
EDIT: I want to add what sqllite has to say about the given error: https://www.sqlite.org/rescode.html#busy
It states that the error occurs "because of concurrent activity by some other database connection". I don't know where this concurrent activity would come form though, as I'm closing everything and I'm just trying to look at the tables in the GUI. I think the issue has something to do with the first issue where it asks me if I want to replace the file.
Based on the previous comments, uninstall DBeaver snap
snap remove dbeaver-ce
and install using the .deb package from the official site
wget https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb
sudo apt install ./dbeaver-ce_latest_amd64.deb
this works for me.
all the credits to the previous comments =)
TLTR: If your database file is located in a mountable filesystem, you need to give dbeaver permission to read files from a mountable filesystem.
I have found 2 ways to solve this issue on ubuntu:
1: Make sure your database file is in home directory. Since dbeaver has permission to access your home directory, it will work.
OR
2: If you have downloaded dbeaver from:
ubuntu software center directly or
from the terminal using snap install
and your database file is located in a mountable filesystem, heard over to ubuntu software center => installed, find dbeaver in the list then click on it, on the next window top left, click on the permissions and toggle Read system mount information and disk quotas, put in your password in the authentication prompt and you're good to go.
I am following this tutorial: https://genieframework.com/docs/tutorials/Developing-MVC-Web-Apps.html#gettingstarted-creatingtheapp where I created my MVC app and selected a MySQL backend. However, I am having issues with MySQL so I want to switch the app to SQLite as the tutorial uses. Is there any way I can switch the app to use that or would I have to manually re-create a new project? If I can switch it, what files need to be manually modified or is there a function that can help me?
You switch it manually, it's quite easy:
1/ add support for SQLite via SearchLightSQLite:
pkg> add SearchLightSQLite
2/ edit db/connection.yml and set adapter to SQLite and database to the path where you want to store the DB, ex:
dev:
adapter: SQLite
database: db/dev.sqlite
3/ Restart the app
For anyone that might face the same challenge,
You need to add SearchLightMySQL to the project by running Pkg add SearchLightMySQL
I'm 100% sure the user/pass are correct.
Screenshot: MYSQL command Line
Screenshot: WebPlatform Message
i've tried all the suggested workaround but none avail
deleting mysql_pwd from registry (HKCU/Software/Microsoft/WebPlatformInstaller/mysql_pwd)
installing latest mysql connector (6.9.9)
the other suggested way is to delete the folder path for mysql on my drive which I dont want to as i have existing data from my current database (MYSQL 5.7)
Have you created a non-root user and tested with it? I would do that anyway for INFOSEC reasons. My two cents: get the site onto a Linux VM. https://roots.io/trellis
I have a huge problem... I am developing desktop app with SQLite but during copy/paste process I lost a power and process was terminated so base was lost. However, I found a way to recover it but base is encrypted. When I try to open connection using conn.Open(); I get this error. If I try to open it with DB Browser for SQLite it asks me a SQLCipher encryption password so it seams to me that data is lost..
Is there any default password ?
Why did this happen and how to prevent it from happening again ?
What can I do ?
Thanks in advance.
Also check that SQLite version you're "connecting" with aligns with the DB file version.
For example, here's a DB file written by SQLite version 3+:
$ file foobar.db
foobar.db: SQLite 3.x database, last written using SQLite version 3027002
And here I also have 2 versions of sqlite:
$ sqlite -version
2.8.17
$ sqlite3 -version
3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1
Obviously in hindsight, opening foobar.db with sqlite version 2 will fail, yielding the same error message:
$ sqlite foobar.db
Unable to open database "foobar.db": file is encrypted or is not a database
But all is good with the correct version:
$ sqlite3 foobar.db
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite>
sqlite> .databases
main: /tmp/foobar.db
sqlite>
The error message is a catch-all, simply meaning that the file format was not recognized.
Ok, finally found a solution that works so posting the answer if anybody will have same trouble as I did..
First of all, use good recover software. For repairing the database I found 3 solutions that work without backup :
Open corrupted database using DB Browser an Export Database to SQL. Name it however you want. Then, create new database and import database from SQL.
There is software that repairs corrupted databases. Download one and use it to repair the database.
Download "sqlite3" from sqlite.org and in command line navigate to folder where "sqlite3" is unzipped. Then try to dump the entire database with .dump, and use those commands to create a new database:
sqlite3 corrupt_table_name.sqlite ".dump" | sqlite3 new.sqlite
I had the same error when I was trying to access a db dump in another system compared to compared to where it was obtained. When I tried to open on a dev machine, it threw the reported error in this thread:
$ sqlite3 db_dump.sqlite .tables
Error: file is encrypted or is not a database
This turned out to be due to the differences in the sqlite version between those systems. This dev system version was 3.6.20.
The version on the production system was 3.8.9. Once I had the sqlite3 upgraded to same version, I was able to access all its data. I am just showing below the tables are displayed as expected:
# sqlite3 -version
3.8.9
# sqlite3 db_dump.sqlite .tables
capture diskio transport
consumer filters processes
This error is rather misleading to begin with, though.
If you've interacted with the database at some point while specifying journal_mode = WAL, and then later try to use the database from a client that does not support WAL (< v3.7.0), this error can also come up.
As noted in the SQLite documentation under Backwards Compatibility, to resolve that without having to recreate the database, explicitly set the journal mode to DELETE:
PRAGMA journal_mode=DELETE;
Your database did not become encrypted (this is only one of the two options in the error message).
Your data recovery tool did not recover the correct data; what you have in the file is something else.
You have to restore the database file from the backup.
The issue is with sqlcipher version upgrade in my case, Whenever I update my pod it automatically upgrade the sqlcipher and the error occurred.
For a quick fix just manually add the SDK instead of Pod install. And for a proper solution use this link GitHub Solution
I'm in need of some help in developing a desktop application with a pre-populated database. I have tried numerous ways to get this working including those mentioned on both Tidesdk's API here http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.Database.DB and at Titanium Desktops old API here http://developer.appcelerator.com/apidoc/desktop/latest/Titanium.Database-module.
While the later (using Titanium not Ti) works in creating a database in the apps directory it does not install my pre-populated sqlite database which is located in the resources file of my app.
A couple of my attempts located below
var db = Titanium.Database.openFile('test_db.sqlite', 'test_db');
var db = Titanium.Database.openFile(Ti.Filesystem.getFile(
Ti.Filesystem.getApplicationDataDirectory(), 'test_db.sqlite'));
var db = Ti.Database.open('test_db');
As stated most of these manage to create a database with the name given but when trying to run something as simple as a db.execute(SELECT) of something I know would exist in my pre-populated db I receive an error stating
Exception executing: SELECT name, id FROM people ORDER BY name COLLATE NOCASE, Error was: SQL Statement invalid or database missing
I have searched high and low for something to answer this but everyone continues to refer to the aforementioned API's or to the Mobile API's Ti.database.install() which does not work either.
Is it possible with titanium desktop to use a pre-populated sqlite database or do I have to populate it after I create it? If so any direction would be helpful (where to place the .sqlite file in the app and what functions to call).
I am currently using Titanium Studio with a titanium desktop osx SDK of 1.2.0.RC4 as requested by tidesdk.org until they have released there open source sdk.
Thanks in advance
This is possible, I just used this feature in a recent desktop app, deployed it successfully to Windows and Mac.
In my experience, sometimes your database file can be corrupted, for example if you use the Titanium.Database.install command, and it cant find the file to preload from (maybe the first time you specified the path wrong for instance), it will create the file itself, any subsequent install commands will not work because it already thinks this database has been installed.
Have you tried clearing out the application data? This is where titanium installs the database. For Mac this is in your /User/Library/Application Support/APPNAME directory. Their is a directory for databases, delete this and try again.
Also, this answer on Titanium Q&A may help, it talks about the process with the Mobile SDK but the Database stuff is the same.
Hope this helps!