1660286460
Если вы знакомы с MySQL, вы, вероятно, уже знаете, что он поставляется с несколькими кодировками символов. Одной из основных кодировок в мире MySQL и в Интернете в целом является UTF-8 — она используется почти во всех веб-приложениях и мобильных приложениях и широко считается вариантом «по умолчанию» для MySQL. UTF-8 также поддерживает несколько наборов символов и имеет несколько других уникальных функций: в этом блоге мы собираемся пройтись по ним, а также мы собираемся подробно рассмотреть одну функцию — тот факт, что MySQL «UTF- 8» не считается «настоящим» UTF-8. Смущенный? Читать дальше!
Начнем с того, что UTF-8 — одна из самых распространенных кодировок символов. В UTF-8 каждый имеющийся у нас символ представлен диапазоном от одного до четырех байтов. Таким образом, у нас есть несколько наборов символов:
UTF8 был набором символов по умолчанию в прошлом, когда MySQL только начинался, и все было отлично. Однако поговорите с администраторами баз данных MySQL в наши дни, и вы быстро поймете, что теперь это уже не так. Проще говоря, utf8 как таковой больше не является набором символов по умолчанию — им является utf8mb4.
Основная причина разделения utf8 и utf8mb4 заключается в том, что UTF-8 отличается от правильной кодировки UTF-8. Это так, потому что UTF-8 не предлагает полной поддержки Unicode, что может привести к потере данных или даже проблемам с безопасностью. Неспособность UTF-8 полностью поддерживать Unicode является настоящим ударом: кодировка UTF-8 требует до четырех байтов на символ, в то время как кодировка «utf8», предлагаемая MySQL, поддерживает только три. Видите проблему на этом фронте? Другими словами, если мы хотим хранить смайлики, представленные так:
Улыбающееся лицо
Мы не можем этого сделать — дело не в том, что MySQL будет хранить это в формате «???» или аналогичный, но он не будет хранить его полностью и ответит сообщением об ошибке, подобным следующему:
Incorrect string value: ‘\x77\xD0’ for column ‘demo_column’ at row 1
С этим сообщением об ошибке MySQL говорит: «Ну, я не узнаю символы, из которых состоит этот смайлик. Извините, я ничего не могу здесь сделать» — в этот момент вам может быть интересно, что делается для решения такой проблемы? MySQL вообще знает о его существовании? Действительно, было бы ложью сказать, что MySQL не знает об этой проблеме — скорее, они знают, но разработчики MySQL так и не удосужились ее исправить. Вместо этого они выпустили обходной путь более десяти лет назад вместе с MySQL 5.5.3.
Этот обходной путь называется «utf8mb4». utf8mb4 почти такой же, как и его более старый аналог — utf8 — просто в кодировке используется от одного до четырех байтов на символ, что, по сути, означает, что он может поддерживать более широкий спектр символов и символов.
Используйте MySQL 8.0, немного поработайте с данными, и вы быстро заметите, что действительно utf8mb4 — это набор символов по умолчанию, доступный в MySQL — более того, предполагается, что в ближайшем будущем utf8mb4 станет ссылкой на стандарт utf8 в MySQL.
По прошествии времени, когда utf8 уступает utf8mb4 почти по всем фронтам, естественно, что есть несколько вариантов сортировки, которые можно использовать. По сути, эти сопоставления действуют как своего рода «набор» правил сортировки, разработанных для лучшего соответствия конкретным наборам данных. utf8mb4 также имеет пару:
utf8mb4_general_ci
ориентирован на более «общее» использование MySQL и utf8. Считается, что этот набор символов использует «ярлыки» для хранения данных, что в некоторых случаях может привести к ошибкам сортировки для повышения скорости.utf8mb4_unicode_ci
предназначен для «продвинутых» пользователей, то есть это набор сопоставлений, основанный на Unicode, и мы можем быть уверены, что наши данные будут обработаны должным образом, если это сопоставление используется.В этом случае обратите внимание на _ci
окончание « » в направлении сопоставления: это означает «без учета регистра». Нечувствительность к регистру связана с сортировкой и сравнением.
Эти две «разновидности» utf8mb4 используются все чаще и чаще — по мере выпуска новых версий MySQL мы также можем видеть, что utf8mb4_unicode_ci
сопоставление является предпочтительным для большинства людей, работающих с MySQL сегодня. Одно можно сказать наверняка — не все люди, использующие MySQL таким образом, знают о функциональных возможностях и преимуществах, предоставляемых utf8mb4 по сравнению с его аналогом utf8, но они, безусловно, увидят разницу, когда будут импортировать данные с необычными символами! Мы уже убедили вас перейти в царство utf8mb4?
Вот как некоторые разработчики создают базы данных и таблицы на основе utf8mb4:
Создание баз данных и таблиц с помощью Arctype
За исключением того, что этот запрос выдает нам ошибку (под запросом), которая часто сбивает с толку как начинающих, так и опытных разработчиков — MySQL, по сути, говорит, что когда мы используем сопоставление на основе utf8mb4, мы также должны использовать совместимый набор символов, и в этом случае latin1 недействителен, поэтому, что бы вы ни делали, помните об этих моментах:
пример успешного запроса в Arctype
Теперь все готово — мы можем хранить все виды символов внутри нашей базы данных и не иметь ошибки MySQL с ошибкой «Неправильное строковое значение»! Ууууу!
UTF-8 в MySQL не работает — он не может поддерживать четыре байта на символ, как это должно быть в UTF-8. «utf8mb4» можно использовать для решения этой проблемы, и, как правило, с ним довольно легко работать — просто выберите конкретную сортировку (в этом случае выберите либо общую, если вы используете MySQL для личного проекта или небольшого веб-сайта, либо Unicode). сопоставления, или если вы используете его для чего-то более технического, или если вы хотите довести MySQL до предела.)
Ссылка: https://arctype.com/blog/mysql-change-charset-utf8mb4/
#mysql
1595905879
HTML to Markdown
MySQL is the all-time number one open source database in the world, and a staple in RDBMS space. DigitalOcean is quickly building its reputation as the developers cloud by providing an affordable, flexible and easy to use cloud platform for developers to work with. MySQL on DigitalOcean is a natural fit, but what’s the best way to deploy your cloud database? In this post, we are going to compare the top two providers, DigitalOcean Managed Databases for MySQL vs. ScaleGrid MySQL hosting on DigitalOcean.
At a glance – TLDR
ScaleGrid Blog - At a glance overview - 1st pointCompare Throughput
ScaleGrid averages almost 40% higher throughput over DigitalOcean for MySQL, with up to 46% higher throughput in write-intensive workloads. Read now
ScaleGrid Blog - At a glance overview - 2nd pointCompare Latency
On average, ScaleGrid achieves almost 30% lower latency over DigitalOcean for the same deployment configurations. Read now
ScaleGrid Blog - At a glance overview - 3rd pointCompare Pricing
ScaleGrid provides 30% more storage on average vs. DigitalOcean for MySQL at the same affordable price. Read now
MySQL DigitalOcean Performance Benchmark
In this benchmark, we compare equivalent plan sizes between ScaleGrid MySQL on DigitalOcean and DigitalOcean Managed Databases for MySQL. We are going to use a common, popular plan size using the below configurations for this performance benchmark:
Comparison Overview
ScaleGridDigitalOceanInstance TypeMedium: 4 vCPUsMedium: 4 vCPUsMySQL Version8.0.208.0.20RAM8GB8GBSSD140GB115GBDeployment TypeStandaloneStandaloneRegionSF03SF03SupportIncludedBusiness-level support included with account sizes over $500/monthMonthly Price$120$120
As you can see above, ScaleGrid and DigitalOcean offer the same plan configurations across this plan size, apart from SSD where ScaleGrid provides over 20% more storage for the same price.
To ensure the most accurate results in our performance tests, we run the benchmark four times for each comparison to find the average performance across throughput and latency over read-intensive workloads, balanced workloads, and write-intensive workloads.
Throughput
In this benchmark, we measure MySQL throughput in terms of queries per second (QPS) to measure our query efficiency. To quickly summarize the results, we display read-intensive, write-intensive and balanced workload averages below for 150 threads for ScaleGrid vs. DigitalOcean MySQL:
ScaleGrid MySQL vs DigitalOcean Managed Databases - Throughput Performance Graph
For the common 150 thread comparison, ScaleGrid averages almost 40% higher throughput over DigitalOcean for MySQL, with up to 46% higher throughput in write-intensive workloads.
#cloud #database #developer #digital ocean #mysql #performance #scalegrid #95th percentile latency #balanced workloads #developers cloud #digitalocean droplet #digitalocean managed databases #digitalocean performance #digitalocean pricing #higher throughput #latency benchmark #lower latency #mysql benchmark setup #mysql client threads #mysql configuration #mysql digitalocean #mysql latency #mysql on digitalocean #mysql throughput #performance benchmark #queries per second #read-intensive #scalegrid mysql #scalegrid vs. digitalocean #throughput benchmark #write-intensive
1618911221
MySQL configuration variables are a set of server system variables used to configure the operation and behavior of the server. In this blog post, we will explain the differences in managing the configuration variables between MySQL 5.7 and MySQL 8.0.
We will explain three different ways for setting the configuration variables based on your use-case. Configuration variables that can be set at run-time are called Dynamic variables and those that need a MySQL server restart to take effect are called Non-Dynamic variables.
#mysql #mysql 5.7 #mysql server #mysql 8.0
1618900707
MySQL configuration variables are a set of server system variables used to configure the operation and behavior of the server. In this blog post, we will explain the differences in managing the configuration variables between MySQL 5.7 and MySQL 8.0.
We will explain three different ways for setting the configuration variables based on your use-case. Configuration variables that can be set at run time are called Dynamic variables and those that need a MySQL server restart to take effect are called Non-Dynamic variables.
#mysql #mysql 5.7 #mysql 8.0 #mysql server
1615787193
Descargue el MBOX al convertidor PST y convierta los archivos MBOX al formato PST. Con esta aplicación, los archivos se convierten a gran velocidad sin ningún problema. Para conocer la aplicación el usuario puede instalar la versión demo de esta aplicación y así conocer la aplicación y su funcionamiento. Con una alta velocidad de compatibilidad, la aplicación convierte todos los archivos MBOX en formato PST.
Esta aplicación avanzada funciona en un orden específico para convertir los archivos MBOX a formato PST. Por lo tanto, a continuación se muestran algunos de los puntos que hablan sobre la aplicación y ver si la aplicación cumple con todas las expectativas del usuario.
Por lo tanto, la aplicación ofrece estas funciones avanzadas que permiten que el software funcione de manera avanzada.
Los usuarios pueden convertir el archivo en unos pocos pasos sin asistencia técnica. Siga estos pasos para convertir su archivo MBOX al formato PST de Outlook:
Paso 1: descargue el convertidor MBOX a PST
Paso 2- Inicie el convertidor
Paso 3- Seleccione los archivos MBOX que desea convertir
Paso 4- Ahora, elija el tipo que desea exportar los archivos.
Paso 5- Elija la ubicación donde desea guardar el archivo
Paso 6- Finalmente, haga clic derecho en el botón “Convertir ahora”.
Estos pasos pueden ser realizados por cualquier usuario novato.
Analicemos las funciones inteligentes de este convertidor que se indican a continuación:
Esta herramienta convierte archivos MBOX de cualquier tipo desde Thunderbird a Apple Mail. Este es un convertidor avanzado.
Los usuarios pueden convertir cualquier cantidad de archivos de datos sin ningún obstáculo. No importa cuál sea el tamaño del archivo MBOX, la conversión procede.
Los archivos que selecciona el usuario se convierten de archivos MBOX al formato PST de Outlook. Los resultados convertidos son los deseados por los usuarios.
El usuario puede guardar el archivo en cualquier ubicación donde el usuario quiera guardarlo. En una ubicación adecuada, se guardan los datos convertidos.
El usuario proporciona una interfaz fácil de usar que ayuda al usuario a convertir los archivos sin problemas y sin ningún obstáculo.
El resultado proporcionado por la aplicación es 100% exacto. La calidad del resultado sigue siendo impecable.
La aplicación da todos los resultados adecuados después de la conversión. Con una alta velocidad de compatibilidad, la tarea de conversión es procesada por la aplicación sin ningún error. Descargue la versión de demostración gratuita del convertidor MBOX a PST para ver si funciona.
Más información:- https://www.datavare.com/ru/конвертер-mbox-в-pst.html
#конвертер mbox в pst #mbox в импортер pst #преобразование mbox в pst #mbox в экспортер pst #конвертировать mbox в pst #импортировать mbox в pst
1595781840
MySQL does not limit the number of slaves that you can connect to the master server in a replication topology. However, as the number of slaves increases, they will have a toll on the master resources because the binary logs will need to be served to different slaves working at different speeds. If the data churn on the master is high, the serving of binary logs alone could saturate the network interface of the master.
A classic solution for this problem is to deploy a binlog server – an intermediate proxy server that sits between the master and its slaves. The binlog server is set up as a slave to the master, and in turn, acts as a master to the original set of slaves. It receives binary log events from the master, does not apply these events, but serves them to all the other slaves. This way, the load on the master is tremendously reduced, and at the same time, the binlog server serves the binlogs more efficiently to slaves since it does not have to do any other database server processing.
Ripple is an open source binlog server developed by Pavel Ivanov. A blog post from Percona, titled MySQL Ripple: The First Impression of a MySQL Binlog Server, gives a very good introduction to deploying and using Ripple. I had an opportunity to explore Ripple in some more detail and wanted to share my observations through this post.
Ripple supports only GTID mode, and not file and position-based replication. If your master is running in non-GTID mode, you will get this error from Ripple:
Failed to read packet: Got error reading packet from server: The replication sender thread cannot start in AUTO_POSITION mode: this server has GTID_MODE = OFF instead of ON.
You can specify Server_id and UUID for the ripple server using the cmd line options: -ripple_server_id and -ripple_server_uuid
Both are optional parameters, and if not specified, Ripple will use the default server_id=112211 and uuid will be auto generated.
While connecting to the master, you can specify the replication user and password using the command line options:
-ripple_master_user and -ripple_master_password
You can use the command line options -ripple_server_ports and -ripple_server_address to specify the connection end points for the Ripple server. Ensure to specify the network accessible hostname or IP address of your Ripple server as the -rippple_server_address. Otherwise, by default, Ripple will bind to localhost and hence you will not be able to connect to it remotely.
You can use the CHANGE MASTER TO command to connect your slaves to replicate from the Ripple server.
To ensure that Ripple can authenticate the password that you use to connect to it, you need to start Ripple by specifying the option -ripple_server_password_hash
For example, if you start the ripple server with the command:
rippled -ripple_datadir=./binlog_server -ripple_master_address= <master ip> -ripple_master_port=3306 -ripple_master_user=repl -ripple_master_password='password' -ripple_server_ports=15000 -ripple_server_address='172.31.23.201' -ripple_server_password_hash='EF8C75CB6E99A0732D2DE207DAEF65D555BDFB8E'
you can use the following CHANGE MASTER TO command to connect from the slave:
CHANGE MASTER TO master_host='172.31.23.201', master_port=15000, master_password=’XpKWeZRNH5#satCI’, master_user=’rep’
Note that the password hash specified for the Ripple server corresponds to the text password used in the CHANGE MASTER TO command. Currently, Ripple does not authenticate based on the usernames and accepts any non-empty username as long as the password matches.
Exploring MySQL Binlog Server - Ripple
It’s possible to monitor and manage the Ripple server using the MySQL protocol from any standard MySQL client. There are a limited set of commands that are supported which you can see directly in the source code on the mysql-ripple GitHub page.
Some of the useful commands are:
SELECT @@global.gtid_executed;
– To see the GTID SET of the Ripple server based on its downloaded binary logs.STOP SLAVE;
– To disconnect the Ripple server from the master.START SLAVE;
– To connect the Ripple server to the master.#cloud #database #developer #high availability #mysql #performance #binary logs #gtid replication #mysql binlog #mysql protocol #mysql ripple #mysql server #parallel threads #proxy server #replication topology #ripple server