Okay I apologize in advance if this seems to be a trivial question but I am new to databases and such so here's my problem.
I have installed xampp and using their MySQL database service. I also able to connect to my database remotely in my network yet I would like to access the database that i have created from another computer out side my LAN. So far i have created a user named "Lester" with all privileges enabled and the host set to "%". In the config file i have it set as follows
# The MySQL server
[mysqld]
user=mysql
port=3308
socket =/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
key_buffer=16M
max_allowed_packet=1M
table_open_cache=64
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
bind-address = 0.0.0.0
How do i go about connecting outside of my network..
Please specify your ip address in the bind address
bind-address=192.168.1.100
Try and let me know if you are facing any problems.
Goto
http://localhost/phpmyadmin -> user accounts -> Edit privileges -> change login information
change Host drop down to Any host
then restart mysql
reference Link
https://www.hacking-tutorial.com/tips-and-trick/how-to-make-xampp-mysql-database-accessible-by-network/#sthash.11j7Xjht.dpbs
Related
despite I've tried everything suggested in the forum I still can't connect to MySQL remotely.
This is my my.cnf file:
[mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
I've tried also adding the line bind-address = 0.0.0.0 but still doesn't work.
Then I deleted it because I've preferred leave the default configuration of my webserver and because I've read that, if is not specified, it is 0.0.0.0 by default.
I have the port 3306 open as you can see from my webmin module:
Linux IPTables Firewall
I've created the MySQL account named 'michele' as you can see from my webimn module User Permissions
and also I granted to michele the permissions for any database Database Permissions
and granted to any host all permissions Host Permissions
To test my remote connection I'm trying to connect from MySQL for excel. that is the error error MySQL fro excel
It is impossible to stabilize the connection. Incorrect response of
the connected party after the time interval or no response from the
connected host MY-IP-SERVER:3306
Also I want to inform you that this is my second attempt to connect remotely. In my first I made it! For a problem that doesn't deal with the remote connection I needed to reinitialize my server and here I am.
The first time I remember that in some configuration file I've put # for comment some line but I don't remember which and if it deal with my problem. Please help me I'm going to be mad!
Michele
I made it!
The problem was for the ipTable rule:
REJECT reject with icmp-host-prohibited
rule
so for solve the problem I deleted it.
on my server shell with root permission:
# sudo iptables -L --line-numbers
find the id rule
and then deleted it:
# sudo iptables -D INPUT 10
I have a database located on a server and it is working correctly. I can access it from the local server and using phpmyadmin from any server connected to the network.
I would want to use Workbench in order to use its functions but I have tried a lot of possibilities and I'm not able to connect from it.
I have found a lot of solutions but anyone could not help me. For this reason, I'm trying to find someone who can help me with this.
First of all, I want to explain that this database is accessible from phpmyadmin (as I said before) and from webserver (I use database in my web application) so, the trouble of denied remote access is discarded. (with user root)
Furthermore I have looking for the problem and in the log of database server I have could find this:
error: connect to 127.0.0.1 port 3306 failed: Permission denied
channel_by_id: 0: bad id
I have tried to use Workbench with TCP/IP with the IP of the database server by port 3306 and with SSH connecting to webserver (this step is running correctly) and connecting to database with local IP and port 3306.
Furthermore, I have checked if port 3306 was closed and it is opened.
The config (my.cnf) is this:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet=1024M
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
I know that this config is not usual but I have not installed it and I would not want to touch a lot because it is working now and a lot of people is using it.
I have tried too to edit hosts.allow adding the line mysqld: all but it did not work.
What can be the problem? Thanks for your help.
(I have checked Stackoverflow's posts too and I have not been able to find a solution)
you need to configure your mysql to allow remote login. then you can either specified your ip or wildcard * to allow all ip to access the mysql database.
this is the command to grant remote access.
Log in to the database server.
Connect to the MySQL database as the root user.
Enter the following command:
GRANT ALL ON <local database name>.* TO <remote web node username>#<remote web node server ip address> IDENTIFIED BY '<database user password>';
For example,
GRANT ALL ON magento_remote.* TO dbuser#192.0.2.50 IDENTIFIED BY 'dbuserpassword';
As a follow-up question on this one:
Accessing localhost (xampp) from another computer over LAN network - how to?
I can access localhost in my browser and MySQL but not from the command-line
I can not figure out how to get from there. From the command-line I use:
mysql -u root -h "IP of remote localhost"
And getting the following error "Error 2003(HY000): Can't connect to MySQL server on "
Basically you need to enable remote access.
This is for mysql workbench
Clicking the [+] icon from the home screen launches the Setup New Connection wizard. The wizard provides a MySQL connection form to create a new MySQL connection, and includes a Configure Server Management option as a step-by-step approach to creating a new MySQL server connection. This can also be executed later (on remote connections) when from the home screen by clicking the top right corner of a MySQL connection tile:
Executing this wizard is required to perform tasks requiring shell access to the host. For example, starting/stopping the MySQL instance and editing the configuration file.
And here is a tutorial where you can peform it step by step:
https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
This is to do it over xamp
You need to open up the configuration it will look something like this:
# The MySQL server
[mysqld]
user=mysql
port=3308
socket =/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
key_buffer=16M
max_allowed_packet=1M
table_open_cache=64
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
bind-address = 0.0.0.0
And you will need to specify the IP adress:
bind-address=192.xxx.xxx.xxx
I have deployed one django application on live IP adress Backend is Mysql running on the same IP.
There is pythoncard(GUI) application installed on some another DNS/Gateway.
I am getting 2003 can't connect mysql server on ...242* while executing.
Grant all and everything done but it is raising the same error. How do I connect to that host through internet or static IP.
HOw to resolve it? Mysql level or application level
Thank you
This is my.conf
[client]
port=3306
[mysql]
default-character-set=latin1
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
bind-address = 110.243.143.*** # SERVER IPADDRESS
# skip-networking
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files (x86)/MySQL/MySQL Server 5.5/"
Make sure MySQL is listening on your public IP. You can set this in my.cnf. The property you are looking for is bind-address.
Next, make sure your user is authorized to connect from a remote IP. You can adjust the permissions using the GRANT statement.
i'm hosting some smaller sites/gameservers on a windows server 2008 R2, and now i can see in my connection log that the database is used more than just local hosted stuff, so i want to limit my mysql to localhost only, and i know by doing that i will not be able to use my "Mysql Control Center" but that is why Xammp is here, there have been "PhpMyAdmin" on it from day one. But how do i make the settings so it is only localhost? and my www.mysqlhostsite.com/phpmyadmin.
Things i got:
Windows server 2008 R2
Mysql
Phpmyadmin
xampp
You can limit connections from a specific address (e.g. localhost) with the bind-address option. Configure this in your my.ini file:
[mysqld]
bind-address = localhost
Alternatively, you can force MySQL to use named pipes (a local-only method for connecting):
[mysqld]
bind-address = localhost
skip-networking
enable-named-pipe
Of course, restart the MySQL Service after editing my.ini.