PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, March 5, 2022

[FIXED] Making a local database accessible online

 March 05, 2022     database, php, phpmyadmin, sql     No comments   

Issue

I am making this Student Information System for my Thesis, and I am doing it in local phpserver. What I want it to be accessible online and locally from other PC's that is connected in Local Area Network. Can someone enlighten me.

PS: I only have done is a wordpress webpage before .


Solution

  1. On your database server, as a user with root privileges, open your MySQL configuration file.

To locate it, enter the following command:

mysql --help

The location displays similar to the following:

Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf

On Ubuntu 16, the path is typically

/etc/mysql/mysql.conf.d/mysqld.cnf.
  1. Search the configuration file for bind-address.

If it exists, change the value as follows.

If it doesn’t exist, add it anywhere except the [mysqld] section.

bind-address =

See MySQL documentation, especially if you have a clustered web server.

  1. Save your changes to the configuration file and exit the text editor.

  2. Restart the MySQL service:

  • CentOS: service mysqld restart
  • Ubuntu: service mysql restart
GRANT ALL ON <local database name>.* TO <remote web node username>@<remote web node server ip address> IDENTIFIED BY '<database user password>';


Answered By - Milad pegah
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing