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
<#1364616384780173373>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
is the mysql instance running inside the container or on the host?
also try running as root maybe
hey @Alex{ }, any luck?
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
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
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