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

can not add user successfully (got an issue with mysql) #3

Open
fuckbfa opened this issue Jul 10, 2019 · 2 comments
Open

can not add user successfully (got an issue with mysql) #3

fuckbfa opened this issue Jul 10, 2019 · 2 comments

Comments

@fuckbfa
Copy link

fuckbfa commented Jul 10, 2019

Ubuntu 19.04,
Python 2.7.16, Python 3.7.3,
pip 19.1.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper

all the requirements have been successfully installed


the script use python3, but MySQLdb is not supported by python3

python3 trojan_manager.py int
Traceback (most recent call last):
  File "trojan_manager.py", line 19, in <module>
    import MySQLdb
ModuleNotFoundError: No module named 'MySQLdb'

try to use pymysql instead:

import pymysql
pymysql.install_as_MySQLdb() 

then successfully get in

but when I've added a user, quit, and query again, there's nothing in the database

journalctl -u mysql
Aborted connection to db: 'trojan' user: 'trojan' host: 'localhost' (Got an error reading communication packets)

sorry for the poor english

@malikshi
Copy link

same here nothing else in database. and how to setting client with user and password?

@k4yt3x
Copy link
Collaborator

k4yt3x commented Jun 9, 2020

Did you install the dependencies from requirements.txt?
Specifically mysqlclient

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

No branches or pull requests

3 participants