mysql connection error

why i cannot connect to mysql in dockers coder@ErpDemo:~/ERP-ULTRA$ mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
5 Replies
Codercord
Codercord6mo ago
<#1364616384780173373>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys6mo ago
is the mysql instance running inside the container or on the host? also try running as root maybe hey @Alex{ }, any luck?
Alex{  }
Alex{ }OP5mo ago
I coundt create mysql database in the docker so i did something else i did create it on the main host and host it to public ip then connect it by the ip
Phorcys
Phorcys5mo ago
that is very unsafe if there's a vulnerability in your mysql instance outside attackers will be able to access the data you should retry running it inside the workspace if possible
Alex{  }
Alex{ }OP5mo ago
i have 2 problem 1st i cant run coder server in the root 2nd it says that you cant run mysql if you are not root even i give the user all permision in the suderos

Did you find this page helpful?