cant connect opencart to mySQL database

喜你入骨 提交于 2019-12-02 12:54:28

问题


I'm trying to set up opencart for my website, but when I fill in everything for the MySQL database I get this error:

No connection could be made because the target machine actively refused it.

I've tried putting it on localhost, I've tried on 127.0.0.1. when I try on 192.168.1.126 (the database server) it says it can't find the database

the server hosting the PHP site is on 192.168.1.125

I'm very new to SQL, I really don't understand it fully. I'm creating a new database in SQL workbench. and filling in the info I need. How to I fix this error?


回答1:


My guess is that your DB user is only allowed to access the DB server from 127.0.0.1. You might want to grant additional privileges to it and in your SQL shell run something like

GRANT ALL PRIVILEGES ON *.* To 'your-db-user'@'192.168.1.125'


来源:https://stackoverflow.com/questions/35445554/cant-connect-opencart-to-mysql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!