Samp server in windows 7 not connecting to mysql? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Samp server in windows 7 not connecting to mysql? (
/showthread.php?tid=362934)
Samp server in windows 7 not connecting to mysql? -
DarrenReeder - 26.07.2012
Right so i posted this problem about a week or 2 ago here:
https://sampforum.blast.hk/showthread.php?tid=358983
but i have a new thread because i have made progress with it quiet a bit..
Basicly, my laptop runs windows 7 and i am using g-stylezzz R7 (fully cached) mysql plugin. I am also using xampp for mysql... When i run a .php file, i can connect to my database just fine but my samp server wont connect..
So, i have moved ALL my server files to a laptop with windows xp (and the same version of xampp) and it works perfectly... so it must be something to do with windows 7/my laptop...
Anyone have any ideas for what i could do to fix this?
Re: Samp server in windows 7 not connecting to mysql? -
ReneG - 26.07.2012
Make sure you're providing the correct credentials for your database, pretty much as simple as that.
EDIT: also post what's in the mysql_log, the best thing about mysql is its debugging feature, use it.
Re: Samp server in windows 7 not connecting to mysql? -
DarrenReeder - 26.07.2012
yeah, the login details are 100% correct. I tested on other machine with exact same script and also with php file on the same machine... it connects fine with the php file..
Quote:
Originally Posted by DarrenReeder
Ah okay,
In the log the first thing i noticed was it didnt recoognise the database name. Thats because i re-installed xampp to make sure it was a fresh copy and i forgot to remake my database and tables..
I have now done that and the error now says:
Код:
[23:46:47] CMySQLHandler::Connect() - Can't connect to MySQL server on 'localhost' (10013) (Error ID: 2003)
I lookde on ****** and it says:
Код:
If the MySQL server is running on Windows, you can connect using TCP/IP. If the server is started with the --enable-named-pipe option, you can also connect with named pipes if you run the client on the host where the server is running. The name of the named pipe is MySQL by default. If you do not give a host name when connecting to mysqld, a MySQL client first tries to connect to the named pipe. If that does not work, it connects to the TCP/IP port. You can force the use of named pipes on Windows by using . as the host name.
...
The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.
REF:http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html
any ideas?
EDIT:
I have tried enableing network connections and the network ports on mysql but cant work out how to do it, anyone know how to do this?
|
thats from my original thread the other week
Re: Samp server in windows 7 not connecting to mysql? -
DarrenReeder - 26.07.2012
bump
Re: Samp server in windows 7 not connecting to mysql? -
DarrenReeder - 27.07.2012
bump