Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adapt this process as necessary.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop' and 'disable'.
  5. Grant access to the Windows IP address, login to mysql server:
    mysql -u root -p mysql
    
    To grant access to a new database, foo, for user bar, and Windows IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL ON foo.* TO bar@'202.54.10.20' IDENTIFIED BY 'PASSWORD';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20, enter:
    mysql> update db set Host='202.54.10.20' where Db='webdb';
    mysql> update user set Host='202.54.10.20' where user='webadmin';
    
    Logout of mysql server:
    mysql> exit
    
  6. FIREWALL steps to be added very soon!

Adapt this process as necessary.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop' and 'disable'.
  5. Grant access to the Windows IP address, login to mysql server:
    mysql -u root -p mysql
    
    To grant access to a new database, foo, for user bar, and Windows IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL ON foo.* TO bar@'202.54.10.20' bar@'192.168.0.20' IDENTIFIED BY 'PASSWORD';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20, enter:
    mysql> update db set Host='202.54.10.20' Host='192.168.0.20' where Db='webdb';
    mysql> update user set Host='202.54.10.20' Host='192.168.0.20' where user='webadmin';
    
    Logout of mysql server:
    mysql> exit
    
  6. FIREWALL steps to be added very soon!

Adapt this process as necessary.necessary. Note: This process is almost exactly the same for mariadb.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop' 'stop', 'status' and 'disable'.
  5. Grant access to the Windows IP address, login to mysql server:
    mysql -u root -p mysql
    
    To grant access to a new database, foo, for user bar, and Windows IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL ON foo.* TO bar@'192.168.0.20' IDENTIFIED BY 'PASSWORD';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20, enter:
    mysql> update db set Host='192.168.0.20' where Db='webdb';
    mysql> update user set Host='192.168.0.20' where user='webadmin';
    
    Logout of mysql server:
    mysql> exit
    
  6. FIREWALL steps to Enable access through the firewall:
    firewall-cmd --permanent --add-service=mysql
    firewall-cmd --reload
    
    The above updates the default 'zone' with the predefined mysql server port settings (firewalld ships with a large selection of common services predefined, including mysql.) As an aside; the same service name can
    be added very soon!used for mariadb.
  7. Test or begin using the mysql server from Windows. Can as necessary for additional remote connection clients.

Adapt this process as necessary. Note: This process is almost exactly the same for mariadb.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop', 'status' and 'disable'.
  5. Grant access to the Windows IP address, login to mysql server:
    mysql -u root -p mysql
    
    To grant access to a new database, foo, for user bar, and Windows IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL ON foo.* TO bar@'192.168.0.20' IDENTIFIED BY 'PASSWORD';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20, enter:
    mysql> update db set Host='192.168.0.20' where Db='webdb';
    mysql> update user set Host='192.168.0.20' where user='webadmin';
    
    Logout of mysql server:
    mysql> exit
    
  6. Enable access through the firewall:
    firewall-cmd --permanent --add-service=mysql
    firewall-cmd --reload
    
    The above updates the default 'zone' with the predefined mysql server port settings (firewalld ships with a large selection of common services predefined, including mysql.) As an aside; the same service name can be used for mariadb.
  7. Test or begin using the mysql server from Windows. Can Change as necessary for additional remote connection clients.

Adapt this process as necessary. Note: This process is almost exactly the same for mariadb.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server service using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop', 'status' and 'disable'.
  5. Grant Login to mysql server and grant access to the Windows IP address, login to mysql server: address:
    mysql -u root -p mysql
    
    To grant access to a new database, foo, for user bar, and Windows IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL ON foo.* TO bar@'192.168.0.20' IDENTIFIED BY 'PASSWORD';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20, enter:
    mysql> update db set Host='192.168.0.20' where Db='webdb';
    mysql> update user set Host='192.168.0.20' where user='webadmin';
    
    Logout of mysql server:
    mysql> exit
    
  6. Enable access through the firewall:
    firewall-cmd --permanent --add-service=mysql
    firewall-cmd --reload
    
    The above updates the default 'zone' with the predefined mysql server port settings (firewalld ships with a large selection of common services predefined, including mysql.) Use --zone=NAME to update a different firewall zone. As an aside; the same service name can be used for mariadb.
  7. Test or begin using the mysql server from Windows. Windows.

Change as necessary for additional remote connection clients.

Adapt this process as necessary. Note: This process is almost exactly the same for mariadb.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server service using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop', 'status' and 'disable'.
  5. Login to mysql server and grant access to the Windows remote (Windows) IP address:
    mysql -u root -p mysql
    
    To create a user, admin, able to login from anywhere and administer all databases, including granting rights to other users (superuser), enter:
    mysql> CREATE USER 'admin'@'%' IDENTIFIED BY 'password';
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'bar'@'%' WITH GRANT OPTION;
    
    To
    grant access to a new database, foo, for user bar, and Windows from a specific remote IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL PRIVILEGES ON foo.* 'foo'.* TO bar@'192.168.0.20' IDENTIFIED BY 'PASSWORD';
    'bar'@'192.168.0.20';
    
    To grant access to an existing database, webdb, user webadmin, and Windows IP 192.168.0.20remote IPs 192.168.0.0/24, enter:
    mysql> update db set Host='192.168.0.20' where Db='webdb';
    mysql> update user set Host='192.168.0.20' where user='webadmin';
    GRANT ALL PRIVILEGES ON 'webdb'.* TO 'webadmin'@'192.168.0.%';
    
    Logout of mysql server:
    mysql> exit
    
    Note: Use 'localhost' for users that will only ever connect from the local machine.
  6. Enable access through the firewall:
    firewall-cmd --permanent --add-service=mysql
    firewall-cmd --reload
    
    The above updates the default 'zone' with the predefined mysql server port settings (firewalld ships with a large selection of common services predefined, including mysql.) Use --zone=NAME to update a different firewall zone. As an aside; the same service name can be used for mariadb.
  7. Test or begin using the mysql server from Windows.

Change as necessary for additional remote connection clients.

Adapt this process as necessary. Note: This process is almost exactly the same for mariadb.

The IP addresses shown are examples only. Some of this content has been replicated from here.

  1. Logon to your Fedora box and open a terminal (use a ssh client, like Putty, if you are doing this from the Windows 7 machine). Switch to root (you will be prompted for your fedora-username password):
    sudo -i
    
  2. Edit /etc/my.cnf using an editor like nano (recommended over vi if you are a Linux newbie):
    nano /etc/my.cnf
    
  3. Locate and edit the bind-address, must be your Fedora machine external IP address, not localhost. Comment out the skip-networking by prefixing it with an asterisk (#). For example:
    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    bind-address    = 192.168.0.10                # example address shown
    # skip-networking
    ...
    
    Save your changes. Note: If you need to determine the IP address of your Fedora machine, use the appropriate address from the output of:
    ip addr show | grep inet
    
  4. Update the mysql server service using systemctl:
    systemctl enable mysql    # ensures the services starts at boot time
    systemctl restart mysql   # assumes mysql server is already running
    
    Note: use man systemctl to find more commands, but the common commands are 'reload', 'start', 'stop', 'status' and 'disable'.
  5. Login to mysql server and grant access to the remote (Windows) IP address:
    mysql -u root -p mysql
    
    To create a user, admin, able to login from anywhere and administer all databases, including granting rights to other users (superuser), enter:
    mysql> CREATE USER 'admin'@'%' IDENTIFIED BY 'password';
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'bar'@'%' WITH GRANT OPTION;
    
    To grant access to a new database, foo, for user bar, and from a specific remote IP 192.168.0.20, enter:
    mysql> CREATE DATABASE foo;
    mysql> GRANT ALL PRIVILEGES ON 'foo'.* TO 'bar'@'192.168.0.20';
    
    To grant access to an existing database, webdb, user webadmin, and remote IPs 192.168.0.0/24, enter:
    mysql> GRANT ALL PRIVILEGES ON 'webdb'.* TO 'webadmin'@'192.168.0.%';
    
    Logout of mysql server:
    mysql> exit
    
    Note: Use 'localhost' for users that will only ever connect from the local machine.
  6. Enable access through the firewall:
    firewall-cmd --permanent --add-service=mysql
    firewall-cmd --reload
    
    The above updates the default 'zone' with the predefined mysql server port settings (firewalld ships with a large selection of common services predefined, including mysql.) Use --zone=NAME to update a different firewall zone. As an aside; the same service name can be used for mariadb.
  7. Test or begin using the mysql server from Windows.

Change as necessary for additional remote connection clients.