Jump to content

Need help with Mysql Remote User

Guest
Go to solution Solved by jj9987,

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?

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

Link to comment
Share on other sites

Link to post
Share on other sites

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?

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

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 comment
Share on other sites

Link to post
Share on other sites

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 

Link to comment
Share on other sites

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/

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

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 comment
Share on other sites

Link to post
Share on other sites

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 Guest
Update...
Link to comment
Share on other sites

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

×