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

Cannot connect to local database in 2024a #438

Open
noamza opened this issue Jul 11, 2024 · 4 comments · May be fixed by #439
Open

Cannot connect to local database in 2024a #438

noamza opened this issue Jul 11, 2024 · 4 comments · May be fixed by #439
Assignees
Labels
awaiting-triage Issues awaiting proper priority/milestone assignment. bug

Comments

@noamza
Copy link

noamza commented Jul 11, 2024

Bug Report

I cannot connect to my local mysql database

Description

I couldn't see in the documentation https://datajoint.github.io/datajoint-docs-original/matlab/index.html how I am supposed to connect but running dj.conn() does not seem to work, regardless of setting name, pw, host.

Reproducibility

Include:

  • OS (WIN

  • MATLAB Version 2024a

  • MySQL Version 8.0.38

  • MySQL Deployment Strategy (local-native

  • DataJoint Version 3.5.1

  • Minimum number of steps to reliably reproduce the issue
    dj.conn()

  • Complete error stack as a result of evaluating the above steps

Error using mym
SSL connection error: unknown error number

Error in [dj.Connection/query](matlab:matlab.lang.internal.introspective.errorDocCallback('dj.Connection/query', 'C:\Users\noama\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\DataJoint+dj\Connection.m', 167)) ([line 167](matlab: opentoline('C:\Users\noama\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\DataJoint+dj\Connection.m',167,0)))
self.connId=mym(-1, 'open', self.host, self.user, self.password, self.use_tls);

Error in [dj.conn](matlab:matlab.lang.internal.introspective.errorDocCallback('dj.conn', 'C:\Users\noama\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\DataJoint+dj\conn.m', 107)) ([line 107](matlab: opentoline('C:\Users\noama\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\DataJoint+dj\conn.m',107,0)))
query(connObj, 'status')

Expected Behavior

see schemas

Screenshots

Additional Research and Context

@noamza noamza added awaiting-triage Issues awaiting proper priority/milestone assignment. bug labels Jul 11, 2024
@noamza
Copy link
Author

noamza commented Jul 11, 2024

I solved this by running the following on my mysql connection on localhost:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newrootpassword'

and then connecting through dj with TLS set to false.

@stephenholtz
Copy link

I just ran into this issue as well, it is because inside of conn.m

elseif ~isstruct(use_tls)
    use_tls = 'none';

And the string 'none' is not handled. If you comment this out and or/change 'none' to 'false', it will work. Maybe one of the maintainers can let us know if that is a problematic fix, happy to make a PR if it seems useful.

@dimitri-yatsenko
Copy link
Member

Thank you, @stephenholtz . We will review and merge. As you know, we are focusing on datajoint-python and your contribution to datajoint-matlab is most appreciated.

@dimitri-yatsenko dimitri-yatsenko self-assigned this Nov 13, 2024
@stephenholtz
Copy link

Gotcha, I'll try to do it over the weekend

@stephenholtz stephenholtz linked a pull request Nov 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-triage Issues awaiting proper priority/milestone assignment. bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants