SERP Hacker support forum - serposcope

Support forum for open-source softwares built by serphacker.com : serposcope the rank checker.

You are not logged in.

#1 2016-08-11 10:07:55

chilly_bang
Member
Registered: 2016-08-10
Posts: 5

Why is MySQL connection refused

Hi
I'm trying to connect serposcope to mysql: mysql is running, database for serposcope is created. i start serposcope from console with:

java -Dserposcope.conf=C:\me\AppData\Roaming\serposcope\serposcope.conf -jar serposcope.jar

In serposcope.conf i tried two kinds of mysql path:

serposcope.db.url=jdbc:mysql://localhost:8080/us_opt1/?user=me&password=mypass&allowMultiQueries=true
and
serposcope.db.url=jdbc:mysql://localhost:8080/us_opt1/db_structure.php?server=1&db=serposcope&user=me&password=mypass&allowMultiQueries=true

Start protocol means:

Can't establish connection to database
java.sql.SQLNonTransientConnectionExceprion: Could not connect to address=<host=localhost><port=8080><type=master> : Connection refused: connect

What i'm doing wrong? I guess, it could be the wrong path? But how is it correct? These two pathes i tried are how i access the database in the browser with PhpMyAdmin.

Offline

#2 2016-08-12 06:51:38

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: Why is MySQL connection refused

They are not related to phpmyadmin path in url. As explained in the documentation it is :

serposcope.db.url=jdbc:mysql://HOSTNAME/DATABASE?user=USER&password=PASS&allowMultiQueries=true

Replace HOSTNAME with your database hostname : localhost most of the time, the port 8080 you appended is very likely to be inocrrect
Replace DATABASE with the database you created in phpmyadmin (probably serposcope ?)

Offline

#3 2016-08-12 06:54:41

Davide
Member
From: CH
Registered: 2016-03-24
Posts: 80
Website

Re: Why is MySQL connection refused

currently im upload my 1gb database to my server. If i change the config fiel. should i set the portnumber? because basic port is allways 3306 should i type: localhost:3306 or just localhost

Edit: just localhost without port number is enough. it works fine.

Last edited by Davide (2016-08-12 07:02:47)


easy-develope.ch ¦ kontakt@easy-develope.ch

Offline

#4 2016-08-12 06:56:57

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: Why is MySQL connection refused

3306 is a special port. It is the default port for MySQL service. If you don't specify it, it will assume it is 3306 so it doesn't make difference.

Offline

Board footer