Skip to content

MySQL Description for Backendless Pro

Backendless Pro uses MySQL as its primary data storage solution. MySQL is deployed as a stateful set within Kubernetes, and its password is generated and stored in Consul KV storage.

Accessing MySQL in Kubernetes

To access MySQL directly within Kubernetes, follow these steps:

Step 1: Log into the Server

  1. Log in to the machine where Backendless Pro is installed.
  2. If you used the standard installation on Ubuntu, log in as the bl-pro-manager user by switching with the following command:
    sudo su - bl-pro-manager
    

Step 2: List Kubernetes Pods

  1. Use the kubectl get pods command to list all active pods.
    kubectl get pods
    
  2. Identify the pod with a name starting with bl-mysql (typically bl-mysql-0).

Step 3: Connect to the MySQL Pod

  1. To access the MySQL pod, use the following command, replacing <pod-name> with the actual pod name, e.g., bl-mysql-0:
    kubectl exec -it <pod-name> -- sh
    

Step 4: Connect to MySQL Database

  1. Once inside the pod, use the MySQL client to connect to the database:
    mysql -u root -p$MYSQL_ROOT_PASSWORD -h 127.0.0.1
    
    This command connects you to MySQL with the root user and the stored root password.

Database Structure and Data Storage

  • General Information: The main database, main_backendless, contains information about developers and applications.
  • Application Data: Each application's data is stored in a dedicated database. The name of each application's database corresponds to the Application ID.

By following these instructions, you should be able to access and manage MySQL databases within your Backendless Pro Kubernetes environment effectively.