The MySQL database will need to be configured to let you have remote access to it. Let's look at how we can do this:
- You will need to have the server and/or client installed.
- Then, we'll create the database and make it accessible from the network, if needed. This will be done using the command line and a Terminal application.
I am using Ubuntu, so these commands will be mostly specific to a Debian-based Linux. If you are using a different Linux distribution, only the installation command would be different. You should install the MySQL server and client according to your distribution. The commands to create the database would be the same.
Here's how we will set up the server:
- You will need the MySQL server and client installed:
sudo apt-get install mysql-server mysql-client
- Run
sudo mysql_secure_installation
, which will allow you to set up the root account. Then, log in to themysql
root account:
sudo mysql -u root -p
- Create a new database
username
andpassword
:GRANT ALL PRIVILEGES...