and I get
pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ ([Errno 61] Connection refused)”)
spent like 3h on this bug already, can’t solve it. Ideas?
Environment: mac. I wonder if there is some fuck up because I had MAMP previously installed. I’m wiling to give $10 if anybody connects to my mac via teamview and fixed this shit. Thank you.
mysql -uroot -p
mysql> use mysql;
# View user's host
mysql> select 'host' from user where user='root';
# Update host to '%'
mysql> update user set host='%' where user='root';
mysql> flush privileges;
mysql> quit
vim /usr/local/etc/my.cnf
# Default Homebrew MySQL server config
[mysqld]
bind-address = 0.0.0.0
# Restart and reconnect MySQL
mysql.server restart
mysql -uroot -h0.0.0.0 -p
If I try this: mysql -uroot -p
I get:
ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’
I think the fact that I had MySQL installed with MAMP may have something to do with it. If I do
mariadb -uroot -p
then it opens ok, but then I get this:
MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> select ‘host’ from user where user=‘root’;
±-----+
| host |
±-----+
| host |
±-----+
1 row in set (0.003 sec)
MariaDB [mysql]> update user set host=‘%’ where user=‘root’;
ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them