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

连接mysql报错 #1411

Open
zhixue8075714 opened this issue May 30, 2021 · 3 comments
Open

连接mysql报错 #1411

zhixue8075714 opened this issue May 30, 2021 · 3 comments

Comments

@zhixue8075714
Copy link

zhixue8075714 commented May 30, 2021

已经检查过,帐号密码都正常,但是启动服务连接数据库报错

logger: init service failed: ./../../lualib/socketchannel.lua:282: Connect to 127.0.0.1:3306 failed
stack traceback:
[C]: in function 'error'
./../../lualib/socketchannel.lua:282: in function <./../../lualib/socketchannel.lua:258>
(...tail calls...)
./../../lualib/mysql.lua:650: in function 'mysql.connect'
./../../ls_game/main.lua:50: in local 'start'
./../../lualib/skynet.lua:631: in function <./../../lualib/skynet.lua:628>
[C]: in function 'xpcall'
./../../lualib/skynet.lua:636: in upvalue 'init_service'
./../../lualib/skynet.lua:649: in upvalue 'f'
./../../lualib/skynet.lua:105: in function <./../../lualib/skynet.lua:104>

@cloudwu
Copy link
Owner

cloudwu commented May 30, 2021

先用 nc 自查端口。

@zhixue8075714
Copy link
Author

多谢 云风大神, 已经使用mysql lib库编写了一套接口实现了mysql连接功能

@aceyin
Copy link

aceyin commented Mar 23, 2022

多谢 云风大神, 已经使用mysql lib库编写了一套接口实现了mysql连接功能

是这个吗:https://dev.mysql.com/downloads/c-api/

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

3 participants