![]() | 1 | initial version |
Adapt this process as necessary.
The IP addresses shown are examples only. Some of this content has been replicated from here.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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
![]() | 2 | No.2 Revision |
Adapt this process as necessary.
The IP addresses shown are examples only. Some of this content has been replicated from here.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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
![]() | 3 | No.3 Revision |
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.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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', 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
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 ![]() | 4 | No.4 Revision |
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.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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
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. ![]() | 5 | No.5 Revision |
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.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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
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.Change as necessary for additional remote connection clients.
![]() | 6 | No.6 Revision |
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.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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 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 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.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.Change as necessary for additional remote connection clients.
![]() | 7 | No.7 Revision |
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.
sudo -i
/etc/my.cnf
using an editor like nano
(recommended over vi
if you are a Linux newbie):
nano /etc/my.cnf
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
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'.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.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.Change as necessary for additional remote connection clients.