Closed ghost closed 8 years ago
Can you run the following command in python and give the result?
import MySQLdb; MySQLdb.connect(host="127.0.0.1", port=3306)
2013/8/25 misiuX notifications@github.com
Hi,
I have a new fresh Ubuntu-Server and I am trying to install Seafile with mysql-support on it.
On the step to initialize the databases I choose number 1 to create new ccnet/seafile/seahub databases. Mysql is running on the same server, but the installation says " Failed to connect to mysql server at " 127.0.0.1:3306"".
When I connect to mysql with "mysql -u root -p" it works.
So I do not understand why the seafile installation cannot connect to the mysql server.
Thanks
— Reply to this email directly or view it on GitHubhttps://github.com/haiwen/seafile/issues/332 .
Yes, here the result. I don´t know what it says. It seems, the connection is okay. Of course the next step would be to use the mysql password.
MySQLdb.connect(host="127.0.0.1", port=3306) Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python2.7/dist-packages/MySQLdb/init.py", line 81, in Connect return Connection(_args, _kwargs) File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in init super(Connection, self).init(_args, _kwargs2) _mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
This may be due to different behavior of MySQLdb. Can you print you MySQLdb version with
print MySQLdb.version
2013/8/26 misiuX notifications@github.com
Yes, here the result. I don´t know what it says. It seems, the connection is okay. Of course the next step would be to use the mysql password.
MySQLdb.connect(host="127.0.0.1", port=3306) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/dist-packages/MySQLdb/init.py", line 81, in Connect return Connection(_args, _kwargs) File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in init super(Connection, self).init(_args, _kwargs2) _mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
— Reply to this email directly or view it on GitHubhttps://github.com/haiwen/seafile/issues/332#issuecomment-23246719 .
OK. I can reproduce the problem now. You can run the setup script with a normal user (not root) to bypass the problem. Or you can comment out line 411 to solve the problem:
# self.check_mysql_server(host,port)
comment out line 411 of setup-seafile-mysql.py
That´s crazy, because I log on my server always as root. But now it works. I commented out the line 411. Thank you very much.
Hi,
I have a new fresh Ubuntu-Server and I am trying to install Seafile with mysql-support on it.
On the step to initialize the databases I choose number 1 to create new ccnet/seafile/seahub databases. Mysql is running on the same server, but the installation says " Failed to connect to mysql server at "127.0.0.1:3306"".
When I connect to mysql with "mysql -u root -p" it works.
So I do not understand why the seafile installation cannot connect to the mysql server.
Thanks