Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to use external SQL - enhancement request #16

Open
specialcircumstances opened this issue Sep 1, 2016 · 14 comments
Open

Option to use external SQL - enhancement request #16

specialcircumstances opened this issue Sep 1, 2016 · 14 comments

Comments

@specialcircumstances
Copy link

Any chance you could add an option to use an external MySQL?

@Duke-Jones
Copy link
Owner

Maybe. On the same or on a different computer ?

@specialcircumstances
Copy link
Author

Different one.

@Duke-Jones
Copy link
Owner

I'm not sure if you want do do this.
Because ED-IBE is is it's own admin it need admin rights on the database.

@michaelwiller
Copy link

#24 I've just added the very same idea. But as an extra datasource. Just like EDDN.
Someone, say on clan-level, would have to host and maintain the database naturally.

@herkalurk
Copy link
Contributor

I honestly would just use it myself. I have a linux server in my house and have mysql running already. Create db, give full permissions, point app at that db. Plus that server already backs up each DB daily, something that wouldn't happen on a builtin installl.

@Duke-Jones
Copy link
Owner

Duke-Jones commented Jan 21, 2017

I haven't try it, but you can.

  1. install ED-IBE in a normal way on your computer
  2. get the script from \Database\script\create_Elite_DB.sql and run it on your own database. This will create the full database structure.
  3. prepare the 2 users with full rights (don't ask "why two users" - so it was grown...) (more details also in "create.cmd")
  4. change the settings in ED-IBE.ini (section [DB_Connection]) but leave the [DB_Server]-part as it is (only change the port if necessary). When ED-IBE starts and already finds a database it will not try to start a new instance of a sql server. So the [DB_Server] will not be considered if ED-IEB finds your server.

If you have done this it's possible working...

Please report - if this works - or not .. ;)

@herkalurk
Copy link
Contributor

herkalurk commented Jan 21, 2017

The capitolization issue comes up. I get an exception because the program tries to read a DB table but uses a lower case table name, even though the create SQL creates all tables with capitol letters.

Clearly it's not an issue of connecting.

21.01.2017 19:03:39 : ED-IBE v0.6.1.0
21.01.2017 19:03:39 : Error while initializing the program object
21.01.2017 19:03:39 : Error while preparing base tables
21.01.2017 19:03:39 : at IBE.SQL.EliteDBIO.PrepareBaseTables(String TableName, Boolean saveChanged) in E:\dev\RN\ED-IBE\ED-IBE\SQL\EliteDBIO.cs:line 408
at IBE.Program.Init() in E:\dev\RN\ED-IBE\ED-IBE\Program.cs:line 418
21.01.2017 19:03:39 : Error on 'TableRead', SQLString = <select * from tbgovernment>(master)
21.01.2017 19:03:39 : at IBE.SQL.DBConnector.TableRead(String CommandText, String Tablename, DataSet Data) in E:\dev\RN\ED-IBE\ED-IBE\SQL\DBConnector.cs:line 591
at IBE.SQL.EliteDBIO.PrepareBaseTables(String TableName, Boolean saveChanged) in E:\dev\RN\ED-IBE\ED-IBE\SQL\EliteDBIO.cs:line 372

@Duke-Jones
Copy link
Owner

Duke-Jones commented Jan 21, 2017

in my opinion this is not a linux problem but simple a setting:

http://dba.stackexchange.com/questions/59407/how-to-make-mysql-table-name-case-insensitive-in-ubuntu

But I don't know if it is possible for you to change this on your server

@herkalurk
Copy link
Contributor

Yes, there is an ability to stop it, but the inconsistency in the code isn't something that should be ignored.

@herkalurk
Copy link
Contributor

After updating the mysql server with the lower case name option, I still get an exception.

21.01.2017 22:02:39 : 21.01.2017 22:02:39 : ED-IBE v0.6.1.0
21.01.2017 22:02:39 : Unhandled Exception

21.01.2017 22:02:39 : Error in retheming-function
21.01.2017 22:02:39 : at IBE.Enums_and_Utility_Classes.Extensions_Control.Retheme(Control controlObject) in E:\dev\RN\ED-IBE\ED-IBE\Enums and Utility Classes\Extensions.cs:line 443
at IBE.Enums_and_Utility_Classes.RNBaseForm.RNBaseForm_Load(Object sender, EventArgs e) in E:\dev\RN\ED-IBE\ED-IBE\Enums and Utility Classes\RNBaseForm.cs:line 138
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

21.01.2017 22:02:39 : Object reference not set to an instance of an object.
21.01.2017 22:02:39 : at IBE.Enums_and_Utility_Classes.Extensions_Control.Retheme(Control controlObject) in E:\dev\RN\ED-IBE\ED-IBE\Enums and Utility Classes\Extensions.cs:line 418

@Duke-Jones
Copy link
Owner

Duke-Jones commented Jan 21, 2017

Yes, there is an ability to stop it, but the inconsistency in the code isn't something that should be ignored.

I have decided to ignore it.

Sorry, don't know what the reason of the current error (your last post) is.
Maybe some unclean states due to multiple trials to start it ?
Clean new try maybe ?

@herkalurk
Copy link
Contributor

herkalurk commented Jan 23, 2017

It's in the exception logs. Had issue with permissions. I gave the user super permissions because you're setting a database innodb parameter.

set global innodb_flush_log_at_trx_commit=2

Basically setup was create database exactly named 'elite_db'.
Create new user RN_User with PW Elite, give it all privileges on the database, and super privileges on the server.
Import the SQL file to create the structure.
Install the application, don't start it.
Edit the ED-IBE.ini file, by default located at C:\users\USERNAME\appdata\local\ED-IBE\ED-IBE.ini
Add a section that won't be in the file for the DB_Connection as follows

[DB_Connection]
Name=master
Server=IP
Database=Elite_DB
User=RN_User
Pass=Elite
ConnectTimeout=60
StayAlive=false
TimeOut=1000

The other thing you may want to look at is DB connections. The program opened up around 30 connections. It only used 1 during import of data, the rest were sleeping the whole time.

@herkalurk
Copy link
Contributor

I got a new exception after restart of application.

23.01.2017 06:30:48 : 23.01.2017 06:30:48 : ED-IBE v0.6.1.0
23.01.2017 06:30:48 : Error in Form_Shown

23.01.2017 06:30:48 : Error during initialization the commanders log tab
23.01.2017 06:30:48 : at IBE.MTPriceAnalysis.tabPriceAnalysis.Init() in E:\dev\RN\ED-IBE\ED-IBE\MainTabs\tabPriceAnalysis.cs:line 222
at IBE.Form1.<Form_Shown_async>d__117.MoveNext() in E:\dev\RN\ED-IBE\ED-IBE\Form1.cs:line 1258

23.01.2017 06:30:48 : Error while starting to create a new baseview
23.01.2017 06:30:48 : at IBE.MTPriceAnalysis.tabPriceAnalysis.createNewBaseView() in E:\dev\RN\ED-IBE\ED-IBE\MainTabs\tabPriceAnalysis.cs:line 746
at IBE.MTPriceAnalysis.tabPriceAnalysis.Init() in E:\dev\RN\ED-IBE\ED-IBE\MainTabs\tabPriceAnalysis.cs:line 206

23.01.2017 06:30:48 : .time and .time have conflicting properties: DataType property mismatch.
23.01.2017 06:30:48 : at System.Data.Merger.MergeSchema(DataTable table)
at System.Data.Merger.MergeTableData(DataTable src)
at System.Data.Merger.MergeTable(DataTable src)
at System.Data.DataTable.Merge(DataTable table, Boolean preserveChanges, MissingSchemaAction missingSchemaAction)
at IBE.MTPriceAnalysis.tabPriceAnalysis.createNewBaseView() in E:\dev\RN\ED-IBE\ED-IBE\MainTabs\tabPriceAnalysis.cs:line 696


@Duke-Jones
Copy link
Owner

Duke-Jones commented Jan 24, 2017

Add a section that won't be in the file for the DB_Connection as follows

Yes, this normally would be created by ED-IBE itself on the first start.

The other thing you may want to look at is DB connections. The program opened up around 30 >connections. It only used 1 during import of data, the rest were sleeping the whole time.

Yes, it's wanted. My principle for this program is to prepare all necessary connections on start (only a few will be opened temporary while running). Due to multiple threads and possible influencing there are a few more connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants