4

Deploy a Dedicated Percona Server for MySQL 8.0 in Azure

 3 years ago
source link: https://www.percona.com/blog/2021/06/24/deploy-a-dedicated-percona-server-for-mysql-8-0-in-azure/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

MySQL in AzureThis quickstart shows you how to use the Azure portal to deploy a dedicated Percona Server for MySQL 8.0 drop-in replacement for MySQL that provides superior performance, scalability, and instrumentation. It also shows you how to connect to the server.

Prerequisites

Existing Azure subscription. If you don’t have a subscription, create a free Azure account before starting.

Create Percona Server for MySQL 8.0 Azure Instance

  1. Go to the Azure portal to create a MySQL database using Percona Server for MySQL 8.0 image. Search for and select Percona Server for MySQL 8.0:Azure MySQL
  2. On the Percona Server for MySQL 8.0 page, press Create:
  3. Create a virtual machine:
    – Create a new Resource group:create a virtual machine
    – Adjust Instance details options:Azure MySQL– Select a VM size to support the workload that you want to run(Size):– Setup Administrator account access:Setting Description Subscription All resources in an Azure subscription are billed together. Resource group A resource group is a collection of resources that share the same lifecycle, permissions, and policies. Virtual machine name Virtual machines in Azure have two distinct names: virtual machine name used as the Azure resource identifier, and guest hostname. When you create a VM in the portal, the same name is used for both the virtual machine name and the hostname. The virtual machine name cannot be changed after the VM is created. You can change the hostname when you log into the virtual machine. Region Choose the Azure region that’s right for you and your customers. Not all VM sizes are available in all regions Availability options Azure offers a range of options for managing availability and resiliency for your applications. Architect your solution to use replicated VMs in Availability Zones or Availability Sets to protect your apps and data from datacenter outages and maintenance events. Learn more Availability zone You can optionally specify an availability zone in which to deploy your VM. If you choose to do so, your managed disk and public IP (if you have one) will be created in the same availability zone as your virtual machine. Image Choose Percona Server ps_8.0.22-13 – Gen1 image as the base operating system for the VM Size Select a VM size to support the workload that you want to run. The size that you choose then determines factors such as processing power, memory, and storage capacity. Azure offers a wide variety of sizes to support many types of uses. Azure charges an hourly price based on the VM’s size and operating system. Learn more about Virtual Machine sizes Authentication type Choose whether the administrator account will use username/password or SSH keys for authentication. Username The administrator username for the VM

    – Open Management tab and select Enable with custom storage account boot diagnostics option to abe to use Serial Console:
    *Note: Serial Console is currently incompatible with a managed boot diagnostics storage account. To use Serial Console, ensure that you are using a custom storage account.

    – Press Review + create to provision Percona Server for MySQL 8.0, review settings and save private ssh key:

    7-1024x839.png
  4. Once the instance is created, you can look around and check all its settings:
    8-1-1024x575.png
  5. Select Go to resource and open Serial Console to check VM boot log. VM is up and running and no issues were reported:
    *Note: Please pay attention to the message from Percona Server for MySQL 8.0. It provides the end-user with a temporary MySQL password and informs them about the need to change it.
    16-1024x640.png
  6. Select Deployment details -> INSTANCE_NAME-ip and copy instance public IP for connecting to the Percona MySQL server:
    9-1024x354.png

Test Local and Remote Connection to the Percona MySQL Server in Azure

Local connection:

  1. Connect to the server using the previously defined username and IP:
    10-1024x306.png
  2. Open mysqld.log and find a temporary password that was set during MySQL Percona Server instance creation:
    Shell
    [azureuser@ps-80 ~]$ sudo less /var/log/mysqld.log
    11-1024x181.png
  3. Connect to the MySQL database and change the root’s password:
    MySQL
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyVeRySeCuReP@ZzW0Rd';
    12-1024x531.png
  4. Create a test database with a table in it and add one record:
    MySQL
    CREATE DATABASE ps80;
    CREATE TABLE ps80.example (id INT PRIMARY KEY, message VARCHAR(30));
    INSERT INTO ps80.example VALUES (1, 'Hello Percona-Server 8.0');
    SELECT * FROM ps80.example;
    13-1024x589.png

Remote connection:

  1. Create a new test MySQL user for remote connections:
    MySQL
    CREATE USER 'ps80'@'%' IDENTIFIED BY 'MyVeRySeCuReP@ZzW0Rd_2';
    GRANT ALL PRIVILEGES ON ps80.* TO 'ps80'@'%';
    flush privileges;
  2. Connect from the remote host to the Percona Server for MySQL in Azure and check our test database and record in the created table:
    Shell
    mysql -u ps80 -h 52.249.221.105 -p
    SELECT * FROM ps80.example;
    14-1024x653.png

Percona Server for MySQL is trusted by thousands of enterprises to provide better performance and concurrency for their most demanding workloads than other MySQL servers and delivers greater value to MySQL server users with optimized performance, greater scalability and availability, enhanced backups and increased visibility.
Now Percona Server for MySQL is available in Azure.

STAY UP-TO-DATE With Percona!

p

Join 33,000+ of your fellow open-source enthusiasts! Our newsletter provides updates on Percona open source software releases, technical resources, and valuable MySQL, MariaDB, PostgreSQL, and MongoDB-related articles. Get information about Percona Live, our technical webinars, and upcoming events and meetups where you can talk with our experts.

Enter your work email address:*

By submitting my information I agree that Percona may use my personal data in send communication to me about Percona services. I understand that I can unsubscribe from the communication at any time in accordance with the Percona Privacy Policy.

Leave a Reply Cancel reply


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK