Search found 75 matches

by docH
Fri 26 Feb 2021 17:00
Forum: dbForge for MySQL
Topic: DBforge Documenter - How to print or otherwise export the results?
Replies: 5
Views: 3641

Re: DBforge Documenter - How to print or otherwise export the results?

I guess it doesn't matter, I just bought the standard version and now realise that to get the documenter you have to pay a fortune for the enterprise version anyway.
by docH
Fri 26 Feb 2021 16:44
Forum: dbForge for MySQL
Topic: access denied when trying to view dependancies
Replies: 0
Views: 3852

access denied when trying to view dependancies

Just bought and installed DBforge studio for mysql standard edition, especially so I could use the dependencies feature.

The environment
I am connected to a remote MySQL database held at an ISP over TC/IP on port 3306.
This is a shared service ( ie I do not have root access, nor can I access to it as localhost)
The username for the database has all the permissions that I am allowed to give it
DBforge Studio version 9.0.505
Server type: MariaDB. Server version: 10.3.27

The situation
In the database explorer I can see all my procedures as expected (along with all the other objects).
Clicking on one shows sub tree items 'Depends on' and 'Used by'. Under 'Used by' it appears to show a variable names starting with @
Clicking 'Depends on' displays 'loading' for a few seconds and then shows a list of other procs and funcs that this proc depends on. This is as expected.

The problem
However, clicking on 'Used by' , or using the small triangle to expand it, gives me an error message
'Select command denied to user 'myusername@myIpaddress' for table 'proc'
and I cannot see any of the procs or funcs that use the selected procedure.

The same thing happens trying to see 'Used by' for procs, funcs or views


This rather defeats the purpose of paying $149.99
Can anyone help with this?
by docH
Fri 26 Feb 2021 09:16
Forum: dbForge for MySQL
Topic: DBforge Documenter - How to print or otherwise export the results?
Replies: 5
Views: 3641

Re: DBforge Documenter - How to print or otherwise export the results?

I have generated it.
I can read it but can't print it
by docH
Thu 25 Feb 2021 15:24
Forum: dbForge for MySQL
Topic: DBforge Documenter - How to print or otherwise export the results?
Replies: 5
Views: 3641

Re: DBforge Documenter - How to print or otherwise export the results?

below are screenshots showing the documenter on a page of the document and File/Print greyed out and below that when a table has been selected but the data viewer panel is greyed out and unresponsive .
Help/about shows
Edition: standard
Version: 2.0.328
This is what I received when I downloaded a trial version of the enterprise.

Greyed out Print

Image


Greyed out data viewer panel


Image
by docH
Sat 06 Feb 2021 13:02
Forum: dbForge for MySQL
Topic: DBforge Documenter - How to print or otherwise export the results?
Replies: 5
Views: 3641

DBforge Documenter - How to print or otherwise export the results?

Using the 30 day trial period documenter with a maria db.
Results look good on the screen but I need to either print them out to put in a physical documentation folder or save them as dynamic pdf (with hyperlinks) or similar in order to show them to someone else who might not have dbforge documenter.
How can I do this?

I notice there is a 'print' function under the File menu but it is greyed out



I also cannot get any results shown using the 'data viewer' window. It opens when selected from the 'View' menu but even with a table selected it's all greyed out.
by docH
Mon 11 Jan 2021 16:05
Forum: SecureBridge
Topic: How to detect if I am connected to my DB by SSH or not?
Replies: 1
Views: 3160

How to detect if I am connected to my DB by SSH or not?

I use the following to connect to a remote MySQL database via SSH

TMyConnection ---> TMySSHIOhandler ---> TScSSHclient ----> TScFileStorage

This seems to work as Wireshark shows encrypted packets.

Sometimes I don't want to use SSH so I delete the connection between TMyConnection and TMySSHIOhandler (this seems to work to stop a SSH connection,, even if its not the correct way to do it)

I have a number of questions

1)
My Delphi application logs all the user connections to the database in a table in the database.

Is there some property or method in any of the above components that will tell me if I am connected via SSH or not so I can log that fact as well? (this is very important as I need to use this in another area to do with IP address manipulation)

2) Is there a better way to 'turn on' and 'turn off' at runtime whether the connection uses SSH or not so I can decide whether or not to use it at runtime?

3)
I think I notice that if TScSSHclient,connected = false at design time and I then run the application, set TScSSHclient,connected := truem connect and then shut down the application, then at design time TScSSHclient,connected remains showing connected = true even though I last left it as false in design the last time. Am I just getting muddled here or is it really happening. If so why?
by docH
Sat 21 Nov 2020 11:38
Forum: SecureBridge
Topic: TScFileStorage - which file is a key associated with?
Replies: 3
Views: 2175

Re: TScFileStorage - which file is a key associated with?

Ok, thanks, that explains it
"You don't have to import the physical key file (e.g., from file1.pub into test1) each time you need the key"
So am I right that once I get it working in design mode with a key downloaded from the server onto my HDD, it will work forever in run mode, even if the key is not on the HDD of the user's machine (provided the key needed by the server doesn't change)
by docH
Thu 12 Nov 2020 16:59
Forum: SecureBridge
Topic: how to POST parameters
Replies: 3
Views: 4690

Re: how to POST parameters

Four months and still no answer to the OP's question
where can I find an example of how to use TScHttpWebRequest.RequestStream
I have read the documentation and find it lacking, particularly in real life examples of use.
I'm also trying to find out how to POST parameters (as content type application/json).

Simply quoting the documentation in response to a question about it isn't very helpful
by docH
Thu 05 Nov 2020 15:08
Forum: SecureBridge
Topic: access denied when IOhandler connected but not otherwise?
Replies: 2
Views: 2192

Re: access denied when IOhandler connected but not otherwise?

Still don't know what the problem was but by duplicating the components and playing with the properties of the file storage and the sshclient it suddenly connected OK. - which doesn't really help as I don't know which property did it.

I suspect it has something to do with the name of the key, the actual filename of the key on the HDD and the FileStorage.KeyExt property especially since after playing for a few days there are many keys in the folder with different extensions. So I'll wait for some replies to my other post here viewtopic.php?f=27&t=42391 that might help to explain which actual key file is being used by the SSHClient and how I know which that is.

I wish the documentation was better instead of that for TSCFileStorage more or less saying
TScFileStorage is used to store information about keys, certificates, and users in files
. but not explaining what all the properties and methods are for. Doing a search for KeyExt returns nothing.
by docH
Thu 05 Nov 2020 12:58
Forum: SecureBridge
Topic: access denied when IOhandler connected but not otherwise?
Replies: 2
Views: 2192

access denied when IOhandler connected but not otherwise?

I am experimenting with a standard TMyConnection, TMyQuery, TMyScIOHandler, TScSSHClient and TSCfileStorage setup, all connected as they should be with TScSSHClient authentication set to atPassword and the correct server credentials set. I assigned a TScSSHClient.HostKeyName and accepted the offer from TSCFilestorage to download a server key.

Whether or not I have TMyConnection.IOHandler property pointing at the TScIOHandler Object, If I toggle the TScSSH client.connected property at design time it allows the connection so the server so the SSH side of things would seem to be OK.

If I delete the TMyConnection.IOHander value, then the TMyConnection and the TMyquery work OK at design time, so the database credentials are set OK

However, when I set the TMyConnection.IOHandler property to be the TScIOHandler Object and then try to open the TMyQuery I get a 'Access denied for <username>@servername (using password :YES)' error.


Strangely, on the same Delphi form I have I followed the same process for a different account and database on the same server and that works OK and gives me a SSH connection to that database.

What could cause the TScSSHclient and TMyConnection to work independently but not when connected together to make a SSH connection?
by docH
Thu 05 Nov 2020 11:33
Forum: SecureBridge
Topic: TScFileStorage - which file is a key associated with?
Replies: 3
Views: 2175

TScFileStorage - which file is a key associated with?

I am having difficulty keeping track of which key files are associated with each key name in my TScFileStorage and this is causing many 'key not verified' errors and 'do you want to download a key from the server' messages.

TScFileStorage has the ability to import a file into a key or to export the key to a file.

First question
If I import a file into a key, how can I later tell which file was imported into which key? eg if I import file1.pub into a key called test1, how can I later confirm, at design time, that test1 does contain, or point to, the file1.pub, and if not, which file it does use?
(I assume I could find out at run time using the keylist but by then the application may have already stopped with an error)

second question.
What is the property TScFileStorage .KeyExt used for ?
ie If TScSSHClient says to use a key called key1 and key1 in TScFileStorage had the file file1.pub imported into it , does it matter that TScFileStorage .KeyExt is still set to the default extension of key
by docH
Sat 31 Oct 2020 13:15
Forum: SecureBridge
Topic: How to store keys in a TScMemoryStorage;?
Replies: 6
Views: 3057

Re: How to store keys in a TScMemoryStorage;?

I'm afraid neither method of using a TScMemoryStorage worked. Both gave a 'Key not verified' error.

I could connect OK via SSH using a TScFileStorage, with password authentication and just a public key ie no private key.
using these connections and a public key stored in the TScFileStorage

Code: Select all

TMyConnection -> TMyQuery -> TDataSource        TMtSSHIOHandler ->TSSHClient -> TScFileStorage
                                   ^
                                   |
                               TDBGrid
However, if at design time, I connected the TScSSHClient to a TScMemory storage instead of a TScFileStorage, put the same public key (correctly constructed using line feeds) into a constant and used the same key name I got a 'Key not verified' error when I added the following code before opening the query.

Code: Select all

procedure TForm1.BtnOpenQueryClick(Sender: TObject);
var
   Key: TscKey;   //to hold the key}
   SStream: TStringStream; // to enable us to transfer a string constant initialization a key

begin
 // set up the public key in the  TScMemoryStorage
 Key := TScKey.Create(LV_ScMemoryStorage.Keys);
 SStream:=TStringStream.Create(JHM_LIVE_PUBLIC_KEY);

{debug}  SStream.SaveToFile('testfile.txt');  //to check we are using the right key

try
  Key.ImportFrom(SStream);			//fill the key with the contents of the stream i.e. the key text
  Key.KeyName := LIVE_PUBLIC_KEY_NAME;	//same key name as was used in the TScFileStorage version
finally
  SStream.Free;
  Key.Free;
end;

LV_MyQuery.Open;

end;
by docH
Thu 29 Oct 2020 22:00
Forum: SecureBridge
Topic: How to store keys in a TScMemoryStorage;?
Replies: 6
Views: 3057

Re: How to store keys in a TScMemoryStorage;?

This seems to be the way, and maybe a bit clearer to understand by doing each operation separately instead of creating a TStringStream at the same time as assigning a value to it and creating a TscKey as a child object of a TScMemoryStorage.

Code: Select all

  
Const 
   PUBLIC_KEY = 'ABCDEF';     //hard coded public key
var
   MemoryStorage : TScMemoryStorage;
   Key: TscKey;
   SStream: TStringStream;
begin
...   
MemoryStorage := ScMemoryStorage.Create(nil);	//make a memory storage object
SStream :=  TStringStream.Create(nil);		//make a string stream
Key:=  TScKey.Create(nil);			//make a key object

SStream.Position := 0;				//set Stream start position
SStream.WriteString(PUBLIC_KEY);		//put the key text into the stream
Key.ImportFrom(SStream);			//fill the key with the contents of the stream i.e. the key text 
Key.KeyName := 'ThePublicKey';			//give the key a name that can be used by a TScSSHClient
MemoryStorage.Keys.Add(key);			//store the key in the memory storage object
...
if this is not correct then please tell me
by docH
Thu 29 Oct 2020 18:35
Forum: SecureBridge
Topic: How to store keys in a TScMemoryStorage;?
Replies: 6
Views: 3057

Re: How to store keys in a TScMemoryStorage;?

Thanks VictorV for getting back so quickly, I'll try out that code in the morning.

So I only have to set values in a Key object and that also stores them in a Storage object?
Can it be done in two separate stages (for clarity) eg
do this bit first to get it into a key

Code: Select all

SStream:=TStringStream.Create(PRIVATE_KEY);
  Key.ImportFrom(SStream);
  Key.KeyName := 'ThePrivateKey';
and them put the Key into the MemoryStorage as a separate operation?
by docH
Thu 29 Oct 2020 18:23
Forum: SecureBridge
Topic: How to re-download the public key via TScFileStorage ?
Replies: 3
Views: 2160

Re: How to re-download the public key via TScFileStorage ?

Ok, I think I understand. I use the TScSSHClient.OnServerKeyValidate event to write my own code to do the download, the TScFileStorage can't do it again for me once it has already done it.

I did study the demo you mention but it seems to contain unnecessary code that make the application look nice to run but no comments at all explaining which bits are actually necessary.

I could run it but I couldn't make it connect as there are no instructions saying what I'm supposed to do.

One thing I did notice though is that although I had a key on my hdd called 'livekey.pub' the client seemed to expect the key to have the same name as the host address ie something of the form 123.45.36.134 . But again, as there are no comments in the code I don't know whether that is just the way that demo does it or if that's the only way it must be done.