Hi guys
I tried connecting a MySQL server to my script
mysql_connect("127.0.0.1", "systemroot", "(alphanumeric, censored, 10 digits, not in brackets)", "estatecity", 7732);
Then I get this error:
[SCRIPT] System initializing
[SCRIPT] Please wait...
[SCRIPT] Loading SQL database
[SCRIPT] Connecting...
AN ERROR HAS OCCURED [Error in 'mysql_connect': Connection failed. Make sure connection details are correct.]
CALLSTACK
*FUNCTION [Init()] main.nut line [20]
*FUNCTION [onScriptLoad()] main.nut line [12]
LOCALS
[this] CLASS
[this] TABLE
[WARNING] onScriptLoad failed to execute -- check the console for more details.
Help appreciated
Maybe the hostname u gave is wrong...
No its not. 127.0.0.1 = localhost
Btw my MySQL port is 7732
Well, considering you are on localhost you could share the code and even credentials. As you know, more details results in faster fixing.
I want to know the syntax, the same problem is happening with me when I was using Apache to use MySQL, so can anyone give me the SYNTAX of mysql_connect?
mysql_connect(string host, string user, string pass, string db, [int port]);
Quote from: S.L.C on Sep 05, 2015, 08:50 AMWell, considering you are on localhost you could share the code and even credentials. As you know, more details results in faster fixing.
I shared everything except for password. Anyways I need to forward 7732, because the only reason I am using MySQL is to have a UCP. I'm not going to host my web server myself I cant set it up under any circumstances whatsoever I tried many times but php never worked. So I decided that I'm not hosting any webservers myself so I will use a 000webhost server
Never mind fixed it by running it as root (root user, I'm not using Linux)
crystelblue i need to script my server can you script my server this is not an order this is a request from your brother
Quote from: hammad on Sep 05, 2015, 03:30 PMcrystelblue i need to script my server can you script my server this is not an order this is a request from your brother
You're not his brother, and this isn't the place to ask. This isn't your topic.