Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Nolanrulesroblox

Need help with Mysql Remote User

MySQL listens by default only on localhost. Have you configured it to listen on all interfaces (or localhost + w/e interface you have)?

Second option is server's firewall. Is there one, is it active, is port 3306/tcp allowed through it?

Recommended Posts

Posted · Original PosterOP

My Remote user: 192.168.0.112 (windows, PHP with mysqli)

My Mysql Server (ubuntu 20.04 lts) 192.168.0.105\

 

My Commands i have run so far:

 

CREATE DATABASE web_search;

 

USE web_search;

 

CREATE TABLE IF NOT EXISTS `web_info` ( `id` int(11) NOT NULL, `meta_title` varchar(100) NOT NULL, `meta_description` varchar(300) NOT NULL, `site_url` varchar(300) NOT NULL, `platform` varchar(300) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=latin1;

 

CREATE USER 'remote4'@'192.168.0.112' IDENTIFIED BY 'mypass';

 

GRANT ALL PRIVILEGES ON web_search.* TO 'remote4'@'192.168.0.112';

 

I get the Error "actively refused connection"

 

On my Config.php:

 

<?php  

   $user = 'remote3'; 

   $password = 'mylegitpasswod''; 

   $database = 'web_search'; 

   $db = new mysqli('192.168.0.105',$user,$password,$database,3306); 

 ?>

 

my error image.thumb.png.91ad9c7e5180b8e2e26bdb12ef91f2f1.png


PC#1 Ryzen 7 2700x GTX 1080ti 64gb GSKILL 3000mhz samsung 970 evo 1tb m.2 SSD Seagate 10tb 7200rpm HDD EVGA T2 1000W FM,80+T

PC#2 Intel i5 4200u intel HD 4400 8gb DDR3 1600 240 kingston SSD (rip laptop 2015-2018)

PC#3 Razer Blade 15 Base (i7 8750h GTX 1060 MaxQ 32gb ddr4 2400 970 evo 1tb seagate 2tb 7200 rpm HDD)

 

Servers:

Super Micro lga 775 Motherboard x5355 16gb ddr2 ECC 250gb hdd 650w psu

(MAIN server) x2 X5660 128gb DDR3 ECC, 240gb inland SSD, Samsung 850 evo 250gb, 6tb Raid 10 (SAS) x2 870W PSUs 

 

Please, take everything I say with a grain of salt. I'm not a professional, just a moderately knowledgeable nerd.

Link to post
Share on other sites
Posted · Best Answer

MySQL listens by default only on localhost. Have you configured it to listen on all interfaces (or localhost + w/e interface you have)?

Second option is server's firewall. Is there one, is it active, is port 3306/tcp allowed through it?


Skynet: MacBook Pro Late 2016 Space Gray | i7-6820HQ 2.7 GHz | 16 GB LPDDR3 | Radeon Pro 455 2048 MB | 512 GB NVMe SSD | 15" 2880x1800

HAL9000: Intel i5-9600k | Cryorig M9 | 16 GB Corsair Vengeance LPX DDR4 3200 MHz | Gigabyte Z390I AORUS PRO WIFI | MSI GTX 1080 Ti SeaHawk X | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 256 GB Samsung 850 Pro | Corsair TX650M | NZXT H210i | LG 34UM95 34" 3440x1440

Hydrogen server: Xeon E5-2675 v3 | Cooler Master Hyper 212X | 64 GB Kingston/Samsung DDR4 ECC | Asus Z10PA-D8 | Corsair HX1000 | 256 GB Samsung 850 Evo + 3x 3 TB WD Red + 2 TB Seagate | Fractal Design Define R5 | unRAID 6.7.0

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to post
Share on other sites
Posted · Original PosterOP
Just now, jj9987 said:

MySQL listens by default only on localhost. Have you configured it to listen on all interfaces (or localhost + w/e interface you have)?

Second option is server's firewall. Is there one, is it active, is port 3306/tcp allowed through it?

I dont use an Interface (if you mean to put items into mysql)

 

How do i Have mysql Listen on all Interfaces? 

 

3306 is allowed 


PC#1 Ryzen 7 2700x GTX 1080ti 64gb GSKILL 3000mhz samsung 970 evo 1tb m.2 SSD Seagate 10tb 7200rpm HDD EVGA T2 1000W FM,80+T

PC#2 Intel i5 4200u intel HD 4400 8gb DDR3 1600 240 kingston SSD (rip laptop 2015-2018)

PC#3 Razer Blade 15 Base (i7 8750h GTX 1060 MaxQ 32gb ddr4 2400 970 evo 1tb seagate 2tb 7200 rpm HDD)

 

Servers:

Super Micro lga 775 Motherboard x5355 16gb ddr2 ECC 250gb hdd 650w psu

(MAIN server) x2 X5660 128gb DDR3 ECC, 240gb inland SSD, Samsung 850 evo 250gb, 6tb Raid 10 (SAS) x2 870W PSUs 

 

Please, take everything I say with a grain of salt. I'm not a professional, just a moderately knowledgeable nerd.

Link to post
Share on other sites
20 minutes ago, Nolanrulesroblox said:

I dont use an Interface (if you mean to put items into mysql)

 

How do i Have mysql Listen on all Interfaces? 

 

3306 is allowed 

Interface as in network interfaces that your server has/is connected to.

 

This guide is for MariaDB, but it's pretty much the same for MySQL - https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/


Skynet: MacBook Pro Late 2016 Space Gray | i7-6820HQ 2.7 GHz | 16 GB LPDDR3 | Radeon Pro 455 2048 MB | 512 GB NVMe SSD | 15" 2880x1800

HAL9000: Intel i5-9600k | Cryorig M9 | 16 GB Corsair Vengeance LPX DDR4 3200 MHz | Gigabyte Z390I AORUS PRO WIFI | MSI GTX 1080 Ti SeaHawk X | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 256 GB Samsung 850 Pro | Corsair TX650M | NZXT H210i | LG 34UM95 34" 3440x1440

Hydrogen server: Xeon E5-2675 v3 | Cooler Master Hyper 212X | 64 GB Kingston/Samsung DDR4 ECC | Asus Z10PA-D8 | Corsair HX1000 | 256 GB Samsung 850 Evo + 3x 3 TB WD Red + 2 TB Seagate | Fractal Design Define R5 | unRAID 6.7.0

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to post
Share on other sites
Posted (edited) · Original PosterOP
2 hours ago, jj9987 said:

Interface as in network interfaces that your server has/is connected to.

 

This guide is for MariaDB, but it's pretty much the same for MySQL - https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/

I have the bind-address already set to 0.0.0.0, still errors.

 

 

Update: I edited the Wrong Config, I was Editing a Dummy file the whole time (f)

Edited by Nolanrulesroblox
Update...

PC#1 Ryzen 7 2700x GTX 1080ti 64gb GSKILL 3000mhz samsung 970 evo 1tb m.2 SSD Seagate 10tb 7200rpm HDD EVGA T2 1000W FM,80+T

PC#2 Intel i5 4200u intel HD 4400 8gb DDR3 1600 240 kingston SSD (rip laptop 2015-2018)

PC#3 Razer Blade 15 Base (i7 8750h GTX 1060 MaxQ 32gb ddr4 2400 970 evo 1tb seagate 2tb 7200 rpm HDD)

 

Servers:

Super Micro lga 775 Motherboard x5355 16gb ddr2 ECC 250gb hdd 650w psu

(MAIN server) x2 X5660 128gb DDR3 ECC, 240gb inland SSD, Samsung 850 evo 250gb, 6tb Raid 10 (SAS) x2 870W PSUs 

 

Please, take everything I say with a grain of salt. I'm not a professional, just a moderately knowledgeable nerd.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×