Skip to content

UndefVarError: mysql_connect not defined #164

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

Closed
VijalPatel opened this issue Jul 14, 2020 · 2 comments
Closed

UndefVarError: mysql_connect not defined #164

VijalPatel opened this issue Jul 14, 2020 · 2 comments

Comments

@VijalPatel
Copy link

VijalPatel commented Jul 14, 2020

Hello,

I got error in Julia MySQL.Jl when i connect my mysql database.

using MySQL

con = mysql_connect(xyzhost, abc, ******, db_test)

Please check below logs for reference

######################### ERROR STACKTRACE #########################
UndefVarError: mysql_connect not defined
(::var"#6#7")() at C:\Users\admin\Desktop\vp\Projects\Test\testapijl\routes.jl:5
#invokelatest#1 at .\essentials.jl:712 [inlined]
invokelatest at .\essentials.jl:711 [inlined]
match_routes(::HTTP.Messages.Request, ::HTTP.Messages.Response, ::Genie.Router.Params{Any}) at C:\Users\admin.julia\packages\Genie\dPHYR\src\Router.jl:466
route_request(::HTTP.Messages.Request, ::HTTP.Messages.Response, ::Sockets.IPv4) at C:\Users\admin.julia\packages\Genie\dPHYR\src\Router.jl:137
handle_request(::HTTP.Messages.Request, ::HTTP.Messages.Response, ::Sockets.IPv4) at C:\Users\admin.julia\packages\Genie\dPHYR\src\AppServer.jl:109
handle_request at C:\Users\admin.julia\packages\Genie\dPHYR\src\AppServer.jl:102 [inlined]
#19 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\macros.jl:127 [inlined]
run_work_thunk(::Genie.AppServer.var"#19#20"{HTTP.Messages.Request,HTTP.Messages.Response}, ::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\process_messages.jl:79
remotecall_fetch(::Function, ::Distributed.LocalProcess; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375
remotecall_fetch(::Function, ::Distributed.LocalProcess) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375
remotecall_fetch(::Function, ::Int64; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417
remotecall_fetch(::Function, ::Int64) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417
setup_http_handler(::HTTP.Messages.Request, ::HTTP.Messages.Response) at C:\Users\admin.julia\packages\Genie\dPHYR\src\AppServer.jl:124
setup_http_handler at C:\Users\admin.julia\packages\Genie\dPHYR\src\AppServer.jl:123 [inlined]
#6 at C:\Users\admin.julia\packages\Genie\dPHYR\src\AppServer.jl:61 [inlined]
handle at C:\Users\admin.julia\packages\HTTP\BOJmV\src\Handlers.jl:253 [inlined]
handle(::HTTP.Handlers.RequestHandlerFunction{Genie.AppServer.var"#6#12"}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\admin.julia\packages\HTTP\BOJmV\src\Handlers.jl:276
#4 at C:\Users\admin.julia\packages\HTTP\BOJmV\src\Handlers.jl:345 [inlined]
macro expansion at C:\Users\admin.julia\packages\HTTP\BOJmV\src\Servers.jl:367 [inlined]
(::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.RequestHandlerFunction{Genie.AppServer.var"#6#12"}},HTTP.ConnectionPool.Transaction{Sockets.TCPSocket},HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})() at .\task.jl:358

@quinnj
Copy link
Member

quinnj commented Jul 14, 2020

In the new 1.0 release, mysql_connect(...) was removed in favor of DBInterface.connect(MySQL.Connection, ...); check out the new docs here: https://juliadatabases.github.io/MySQL.jl/dev/

@quinnj quinnj closed this as completed Jul 14, 2020
@VijalPatel
Copy link
Author

Thank You so much, Now its working

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

No branches or pull requests

2 participants