The MySQL Utilities Team is pleased to announce a new release that contains our newest features – SSL and configuration file support. These were added to release-1.5.0-alpha.
How can I make a secure connection to my server via Utilities?
Use the new SSL command-line options that are available for all utilities:
–ssl-ca : The path to a file that contains a list of trusted SSL certificate authorities. –ssl-cert : The name of the SSL certificate file to use for establishing a secure connection. –ssl-key : The name of the SSL key file to use for establishing a secure connection. Then just specify the appropriate values on the command-line with any other parameters.
How can I use configuration files?
If typing all of those SSL options seems tedious, you can specify this information in your configuration file and reference the file via a new syntax. You can also supply a path to the file. Observe.
–server=
Example: –server=/dev/env/test1/my.cnf[server1_ssl]
In this example, the utility will read the SSL option values from the my.cnf file in /dev/env/test1/ looking for them in the server1_ssl section. Thus, you can make as many sections as you have servers and/or combinations of login option values. How cool is that?
Here’s an example with two entries; the first one has SSL options.
[instance_3307] port=3307 user=root password=lilly-pass host=localhost ssl-ca=C:/newcerts/cacert.pem ssl-cert=C:/newcerts/client-cert.pem ssl-key=C:/newcerts/client-key.pem [instance_3308] port=3308 user=root password=other-pass host=localhost
As you can see, you can use this new syntax for any connection – SSL or not! No more typing out the user, password, blah, blah, blah, just plug the information into your configuration file and you’re done with remembering ports and sockets and passwords and … you get the idea.
SSL Examples
Now let’s see the SSL feature in action. It’s really quite simple.
Example1: Using command-line options:
$ mysqlserverinfo –server=root:pass@localhost:3307 / –ssl-ca=C:/newcerts/cacert.pem / –ssl-cert=C:/newcerts/client-cert.pem / –ssl-key=C:/newcerts/client-key.pem / –format=vertical # Source on localhost: … connected. ************************* 1. row ************************* server: localhost:3307 config_file: binary_log: binary_log_pos: relay_log: relay_log_pos: version: 5.6.15 datadir: C:/MySQL/instance_3307/ basedir: C:/MySQL/mysql-5.6.15-winx64 plugin_dir: C:/MySQL/mysql-5.6.15-winx64/lib/plugin/ general_log: OFF general_log_file: general_log_file_size: log_error: C:/MySQL/instance_3307/clone.err log_error_file_size: 1569 bytes slow_query_log: OFF slow_query_log_file: slow_query_log_file_size: 1 row. #…done.
Example2: Using the configuration file specification:
$ mysqlserverinfo –server=c:/MySQL/instance-3307.cnf[instance_3307] / –format=vertical # Source on localhost: … connected. ************************* 1. row ************************* server: localhost:3307 config_file: binary_log: binary_log_pos: relay_log: relay_log_pos: version: 5.6.15 datadir: C:/MySQL/instance_3307/ basedir: C:/MySQL/mysql-5.6.15-winx64 plugin_dir: C:/MySQL/mysql-5.6.15-winx64/lib/plugin/ general_log: OFF general_log_file: general_log_file_size: log_error: C:/MySQL/instance_3307/clone.err log_error_file_size: 1569 bytes slow_query_log: OFF slow_query_log_file: slow_query_log_file_size: 1 row. #…done.
Configuration File Example
Here, I’ve added the following to my configuration file:
[instance_13001] port=13001 user=root password=mippippipi host=localhost Now I execute a utility: $ mysqlserverinfo.py –server=my.cnf[instance_13001] –format=vertical # Source on localhost: … connected. ************************* 1. row ************************* server: localhost:13001 config_file: /etc/my.cnf, /etc/mysql/my.cnf binary_log: clone-bin.000001 binary_log_pos: 341 relay_log: relay_log_pos: version: 5.6.17-log datadir: /Volumes/Source/source/temp_13001/ basedir: /Volumes/Source/source/bzr/mysql-5.6 plugin_dir: /Volumes/Source/source/bzr/mysql-5.6/lib/plugin/ general_log: OFF general_log_file: general_log_file_size: log_error: log_error_file_size: slow_query_log: OFF slow_query_log_file: slow_query_log_file_size: 1 row.
#…done.
Wow, now that’s easier and it also reduces security concerns by removing the password from the command-line.
But wait, there is an even more secure way to specify passwords: login-paths!
Note: MySQL Utilities version 1.2.1 and later support login-paths.
In the above example, the password is stored in plain-text in the option file. However, if you use login-paths, you can store the same information in a encrypted file (.mylogin.cnf). Wow. No more plain text passwords!
Example: Using login-paths
Use the mysql_config_editor tool (http://dev.mysql.com/doc/en/mysql-config-editor.html) to add the connection information as follows.
$ mysql_config_editor set –login-path=instance_13001 –host=localhost –user=root –port=13001 –passwordEnter password: Next, use the following command to confirm that the login-path data was correctly added to . mylogin.cnf (the encrypted file): $ mysql_config_editor print –login-path=instance_13001 [instance_13001] user = root password = ***** host = localhost port = 13001
Now, execute the desired utility specifying the login-path section instead of the usual user:passwd@host:port:socket:
$ mysqlserverinfo –server=instance_13001 –format=vertical # Source on localhost: … connected. ************************* 1. row ************************* server: localhost:13001 config_file: /etc/my.cnf, /etc/mysql/my.cnf binary_log: clone-bin.000001 binary_log_pos: 341 relay_log: relay_log_pos: version: 5.6.17-log datadir: /Volumes/Source/source/temp_13001/ basedir: /Volumes/Source/source/bzr/mysql-5.6 plugin_dir: /Volumes/Source/source/bzr/mysql-5.6/lib/plugin/ general_log: OFF general_log_file: general_log_file_size: log_error: log_error_file_size: slow_query_log: OFF slow_query_log_file: slow_query_log_file_size: 1 row. #…done.
How Can I Download MySQL Utilities?
You can download MySQL Utilities 1.5.0-alpha from the following link using one of the pre-built installation repositories including a source download. Be sure to click the “Development Releases” tab to see the 1.5.0 version download links.
http://dev.mysql.com/downloads/tools/utilities/
Where is the Documentation?
You can find online documentation for MySQL Utilities version 1.5 at:
http://dev.mysql.com/doc/mysql-utilities/1.5/en/index.html
以上就是New! MySQL Utilities Now Supports SSL and Configuration File的内容,更多相关内容请关注PHP中文网(www.php.cn)!

MySQLはオープンソースのリレーショナルデータベース管理システムであり、主にデータを迅速かつ確実に保存および取得するために使用されます。その実用的な原則には、クライアントリクエスト、クエリ解像度、クエリの実行、返品結果が含まれます。使用法の例には、テーブルの作成、データの挿入とクエリ、および参加操作などの高度な機能が含まれます。一般的なエラーには、SQL構文、データ型、およびアクセス許可、および最適化の提案には、インデックスの使用、最適化されたクエリ、およびテーブルの分割が含まれます。

MySQLは、データストレージ、管理、クエリ、セキュリティに適したオープンソースのリレーショナルデータベース管理システムです。 1.さまざまなオペレーティングシステムをサポートし、Webアプリケーションやその他のフィールドで広く使用されています。 2。クライアントサーバーアーキテクチャとさまざまなストレージエンジンを通じて、MySQLはデータを効率的に処理します。 3.基本的な使用には、データベースとテーブルの作成、挿入、クエリ、データの更新が含まれます。 4.高度な使用には、複雑なクエリとストアドプロシージャが含まれます。 5.一般的なエラーは、説明ステートメントを介してデバッグできます。 6.パフォーマンスの最適化には、インデックスの合理的な使用と最適化されたクエリステートメントが含まれます。

MySQLは、そのパフォーマンス、信頼性、使いやすさ、コミュニティサポートに選択されています。 1.MYSQLは、複数のデータ型と高度なクエリ操作をサポートし、効率的なデータストレージおよび検索機能を提供します。 2.クライアントサーバーアーキテクチャと複数のストレージエンジンを採用して、トランザクションとクエリの最適化をサポートします。 3.使いやすく、さまざまなオペレーティングシステムとプログラミング言語をサポートしています。 4.強力なコミュニティサポートを提供し、豊富なリソースとソリューションを提供します。

INNODBのロックメカニズムには、共有ロック、排他的ロック、意図ロック、レコードロック、ギャップロック、次のキーロックが含まれます。 1.共有ロックにより、トランザクションは他のトランザクションが読み取らないようにデータを読み取ることができます。 2.排他的ロックは、他のトランザクションがデータの読み取りと変更を防ぎます。 3.意図ロックは、ロック効率を最適化します。 4。ロックロックインデックスのレコードを記録します。 5。ギャップロックロックインデックス記録ギャップ。 6.次のキーロックは、データの一貫性を確保するためのレコードロックとギャップロックの組み合わせです。

MySQLクエリのパフォーマンスが低いことの主な理由には、インデックスの使用、クエリオプティマイザーによる誤った実行計画の選択、不合理なテーブルデザイン、過剰なデータボリューム、ロック競争などがあります。 1.インデックスがゆっくりとクエリを引き起こし、インデックスを追加するとパフォーマンスが大幅に向上する可能性があります。 2。説明コマンドを使用してクエリ計画を分析し、オプティマイザーエラーを見つけます。 3.テーブル構造の再構築と結合条件を最適化すると、テーブルの設計上の問題が改善されます。 4.データボリュームが大きい場合、パーティション化とテーブル分割戦略が採用されます。 5.高い並行性環境では、トランザクションの最適化とロック戦略は、ロック競争を減らすことができます。

データベースの最適化では、クエリ要件に従ってインデックス作成戦略を選択する必要があります。1。クエリに複数の列が含まれ、条件の順序が固定されている場合、複合インデックスを使用します。 2。クエリに複数の列が含まれているが、条件の順序が修正されていない場合、複数の単一列インデックスを使用します。複合インデックスは、マルチコラムクエリの最適化に適していますが、単一列インデックスは単一列クエリに適しています。

MySQLスロークエリを最適化するには、slowquerylogとperformance_schemaを使用する必要があります。1。LowerQueryLogを有効にし、しきい値を設定して、スロークエリを記録します。 2。performance_schemaを使用してクエリの実行の詳細を分析し、パフォーマンスのボトルネックを見つけて最適化します。

MySQLとSQLは、開発者にとって不可欠なスキルです。 1.MYSQLはオープンソースのリレーショナルデータベース管理システムであり、SQLはデータベースの管理と操作に使用される標準言語です。 2.MYSQLは、効率的なデータストレージと検索機能を介して複数のストレージエンジンをサポートし、SQLは簡単なステートメントを通じて複雑なデータ操作を完了します。 3.使用の例には、条件によるフィルタリングやソートなどの基本的なクエリと高度なクエリが含まれます。 4.一般的なエラーには、SQLステートメントをチェックして説明コマンドを使用することで最適化できる構文エラーとパフォーマンスの問題が含まれます。 5.パフォーマンス最適化手法には、インデックスの使用、フルテーブルスキャンの回避、参加操作の最適化、コードの読み取り可能性の向上が含まれます。


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

MinGW - Minimalist GNU for Windows
このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

SublimeText3 Linux 新バージョン
SublimeText3 Linux 最新バージョン

SecLists
SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

AtomエディタMac版ダウンロード
最も人気のあるオープンソースエディター
