1 year ago

#40415

test-img

Joe

msnoise mysql connect error to mysql server

There is a problem with mysql connection.

When I use msnoise db init, there are some questions.

What database technology do you want to use?
 [1] sqlite
 [2] mysql
Choice: 2
Server: [localhost] :
Database: [msnoise]: 
Username: [msnoise]: 
Password : 
Table prefix: []:

And in the MySQL Workbench, login name is msnoise and edited 'Limit to Hosts Matching' as '%'.

I answered server[localhost] as 127.0.0.1, localhost, server name etc, Database as msnoise, username as msnoise, table prefix as blank but there is an error as below.

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
(Background on this error at: https://sqlalche.me/e/14/e3q8)

I cannot find what the problem is.

Also, when I write 'mysql' on linux, the error as below occurs.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I saw my.cnf but nothing was written related to mysql.sock and cannot find the file location.

Could you please let me know the solutions?

mysql

pymysql

operationalerror

0 Answers

Your Answer

Accepted video resources