Minumum mysql memory using

 

Setting Up a MySQL User

Setting Up a MySQL User

Our application requires to access the MySQL database. For security reasons, we do not want this user to be the root MySQL user, so we define a user named www-data that has read access to the local databases and can only connect locally with some password.

  • First we need to connect to the MySQL monitor using the default password we specified earlier:

  • Then we can create our user and exit the MySQL monitor:

MySQL: Connect From an Other System / Computer

You need to allow access to 192.168.1.5 from apache server located at 192.168.1.8.

Step #1: Configure MySQL Server For Remote Access

Modify or append as follows:

Step #2: Linux Firewall Configuration For TCP Port # 3306
# >>>> You need to open TCP port # 3306 at the firewall level, enter:

Sample outputs:

How Do I Enable Remote Access To MySQL Database Server?

How Do I Enable Remote Access To MySQL Database Server?

You need type the following commands which will allow remote connections.
Step # 1: Login Using SSH (if server is outside your data center)

First, login over ssh to remote MySQL database server:

Once connected you need to edit the MySQL server configuration file my.cnf using a text editor such as vi.

Step # 3: Once file opened, locate line that read as follows

Where,

bind-address : IP address to bind to.
skip-networking : Don’t listen for TCP/IP connections at all. All interaction with mysqld must be made via Unix sockets. This option is highly recommended for systems where only local requests are allowed. Since you need to allow remote connection this line should be removed from my.cnf or put it in comment state.
Step# 4 Save and Close the file

Step # 5 Grant access to remote IP address

 

Step # 6: Logout of MySQL

Type exit command to logout mysql:
mysql> exit

Step # 7: Open port 3306

 

Step # 8: Test it