ホームページ データベース mysql チュートリアル Installation MariaDB5.5 on RHEL6_MySQL

Installation MariaDB5.5 on RHEL6_MySQL

Jun 01, 2016 pm 01:28 PM

RHELMariaDB

bitsCN.com

Installation MariaDB5.5 on RHEL6

 

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel ssse2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gettext-devel libXpm-devel libtool perl-DBD-MySQL bison  cmake  [root@test mariadb-5.5.33a]# mkdir -p /data/mariadb5.5 /service/mariadb5.5  [root@test mariadb-5.5.33a]# cmake . -DCMAKE_INSTALL_PREFIX=/service/mariadb5.5 -DMYSQL_UNIX_ADDR=/data/mariadb5.5/mariadb.sock -DMYSQL_DATADIR=/data/mariadb5.5 -DSYSCONFDIR=/service/mariadb5.5 -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=30308 -DWITH_XTRADB_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DWITH_EXTRA_CHARSETS=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_BIG_TABLES=1 -DWITH_DEBUG=0 -DCOMPILATION_COMMENT=ZWC-MariaDB  [root@test mariadb-5.5.33a]# make && make install  [root@test ~]# cat /service/mariadb5.5/my.cnf   [client]    port            = 30308  socket          = /data/mariadb5.5/mariadb.sock    
ログイン後にコピー

[mysqld]    port            = 30308    socket          = /data/mariadb5.5/mariadb.sock    skip-external-locking    back_log = 500    lower_case_table_names = 1    skip-name-resolve    max_connections = 1024    table_open_cache = 512    binlog_cache_size = 1M    max_heap_table_size = 300M    read_buffer_size = 10M    read_rnd_buffer_size = 16M    sort_buffer_size = 8M    join_buffer_size=4M    thread_cache_size = 4    thread_concurrency = 4    query_cache_size = 200M    ft_min_word_len = 4    thread_stack = 192K    tmp_table_size = 200M    slow_query_log    long_query_time = 2    slow_query_log_file = /data/mariadb5.5/slowsql.sql    key_buffer_size = 32M    bulk_insert_buffer_size = 64M    myisam_sort_buffer_size = 128M    myisam_max_sort_file_size = 200M    myisam_repair_threads = 4    myisam_recover        # setup innodb    innodb_additional_mem_pool_size = 16M    innodb_buffer_pool_size = 2500M    innodb_data_file_path = ibdata1:10M:autoextend    innodb_write_io_threads = 4    innodb_read_io_threads = 4    innodb_thread_concurrency = 16    innodb_flush_log_at_trx_commit = 2    innodb_log_buffer_size = 8M    innodb_log_file_size = 512M    innodb_log_files_in_group = 3    innodb_max_dirty_pages_pct = 90    innodb_lock_wait_timeout = 120    init_connect = 'SET autocommit=0'    innodb-file-per-table = 1    innodb-open-file = 500    innodb_flush_method=O_DIRECT    open_files_limit = 65535      expire_logs_days = 5    event_scheduler = 1        log-bin=binlog-master    binlog_format=mixed    server-id       = 1        [mysqldump]    quick    max_allowed_packet = 16M        [mysql]    prompt=//u@//d //r://m://s>    no-auto-rehash        [myisamchk]    key_buffer_size = 128M    sort_buffer_size = 128M    read_buffer = 2M    write_buffer = 2M        [mysqlhotcopy]    interactive-timeout    [root@test ~]# /service/mariadb5.5/scripts/mysql_install_db --defaults-file=/service/mariadb5.5/my.cnf --basedir=/service/mariadb5.5 --datadir=/data/mariadb5.5 --user=mysql  Installing MariaDB/MySQL system tables in '/data/mariadb5.5' ...  OK  Filling help tables...  OK    To start mysqld at boot time you have to copy  support-files/mysql.server to the right place for your system    PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !  To do so, start the server, then issue the following commands:    '/service/mariadb5.5/bin/mysqladmin' -u root password 'new-password'  '/service/mariadb5.5/bin/mysqladmin' -u root -h 192.168.1.9 password 'new-password'    Alternatively you can run:  '/service/mariadb5.5/bin/mysql_secure_installation'    which will also give you the option of removing the test  databases and anonymous user created by default.  This is  strongly recommended for production servers.    See the MariaDB Knowledgebase at http://kb.askmonty.org or the  MySQL manual for more instructions.    You can start the MariaDB daemon with:  cd '/service/mariadb5.5' ; /service/mariadb5.5/bin/mysqld_safe --datadir='/data/mariadb5.5'    You can test the MariaDB daemon with mysql-test-run.pl  cd '/service/mariadb5.5/mysql-test' ; perl mysql-test-run.pl    Please report any problems with the '/service/mariadb5.5/scripts/mysqlbug' script!    The latest information about MariaDB is available at http://mariadb.org/.  You can find additional information about the MySQL part at:  http://dev.mysql.com  Support MariaDB development by buying support/new features from  Monty Program Ab. You can contact us about this at sales@montyprogram.com.  Alternatively consider joining our community based development effort:  http://kb.askmonty.org/en/contributing-to-the-mariadb-project/  [root@test ~]# /service/mariadb5.5/bin/mysqld_safe --defaults-file=/service/mariadb5.5/my.cnf --basedir=/service/mariadb5.5 --datadir=/data/mariadb5.5 --user=mysql &  [1] 19871  [root@test ~]# 131101 22:58:50 mysqld_safe Logging to '/data/mariadb5.5/test.err'.  131101 22:58:50 mysqld_safe Starting mysqld daemon with databases from /data/mariadb5.5  [root@test ~]# /service/mariadb5.5/bin/mysqladmin -uroot password   New password:   Confirm new password:   [root@test ~]#   [root@test ~]#   [root@test ~]# /service/mariadb5.5/bin/mysql -uroot -p  Enter password:   ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)  [root@test ~]# /service/mariadb5.5/bin/mysql -uroot -p  Enter password:   Welcome to the MariaDB monitor.  Commands end with ; or /g.  Your MariaDB connection id is 5  Server version: 5.5.33a-MariaDB-log ZWC-MariaDB    Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.    Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.    MariaDB [(none)]> delete from mysql.user where password='';  Query OK, 5 rows affected (0.03 sec)    MariaDB [(none)]> delete from mysql.db where user='';  Query OK, 2 rows affected (0.04 sec)    MariaDB [(none)]> select @@version;  +---------------------+  | @@version           |  +---------------------+  | 5.5.33a-MariaDB-log |  +---------------------+  1 row in set (0.00 sec)    MariaDB [(none)]> show engines;  +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+  | Engine             | Support | Comment                                                                    | Transactions | XA   | Savepoints | +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+  | MRG_MYISAM         | YES     | Collection of identical MyISAM tables                                      | NO           | NO   | NO         |  | InnoDB             | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |  | CSV                | YES     | CSV storage engine                                                         | NO           | NO   | NO         |  | BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears)             | NO           | NO   | NO         |  | MyISAM             | YES     | MyISAM storage engine                                                      | NO           | NO   | NO         |  | PERFORMANCE_SCHEMA | YES     | Performance Schema                                                         | NO           | NO   | NO         |  | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                  | NO           | NO   | NO         |  | Aria               | YES     | Crash-safe tables with MyISAM heritage                                     | NO           | NO   | NO         |  +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+  8 rows in set (0.00 sec)    MariaDB [(none)]>   
ログイン後にコピー

 

 

Percona-XtraDB, Supports transactions, row-level locking, and foreign keys

 

bitsCN.com
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

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

AI Clothes Remover

AI Clothes Remover

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

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

MySQLでインデックスを使用するよりも、フルテーブルスキャンがいつ速くなるのでしょうか? MySQLでインデックスを使用するよりも、フルテーブルスキャンがいつ速くなるのでしょうか? Apr 09, 2025 am 12:05 AM

完全なテーブルスキャンは、MySQLでインデックスを使用するよりも速い場合があります。特定のケースには以下が含まれます。1)データボリュームは小さい。 2)クエリが大量のデータを返すとき。 3)インデックス列が高度に選択的でない場合。 4)複雑なクエリの場合。クエリプランを分析し、インデックスを最適化し、オーバーインデックスを回避し、テーブルを定期的にメンテナンスすることにより、実際のアプリケーションで最良の選択をすることができます。

INNODBフルテキスト検索機能を説明します。 INNODBフルテキスト検索機能を説明します。 Apr 02, 2025 pm 06:09 PM

INNODBのフルテキスト検索機能は非常に強力であり、データベースクエリの効率と大量のテキストデータを処理する能力を大幅に改善できます。 1)INNODBは、倒立インデックスを介してフルテキスト検索を実装し、基本的および高度な検索クエリをサポートします。 2)一致を使用してキーワードを使用して、ブールモードとフレーズ検索を検索、サポートします。 3)最適化方法には、単語セグメンテーションテクノロジーの使用、インデックスの定期的な再構築、およびパフォーマンスと精度を改善するためのキャッシュサイズの調整が含まれます。

Windows 7にMySQLをインストールできますか? Windows 7にMySQLをインストールできますか? Apr 08, 2025 pm 03:21 PM

はい、MySQLはWindows 7にインストールできます。MicrosoftはWindows 7のサポートを停止しましたが、MySQLは引き続き互換性があります。ただし、インストールプロセス中に次のポイントに注意する必要があります。WindowsのMySQLインストーラーをダウンロードしてください。 MySQL(コミュニティまたはエンタープライズ)の適切なバージョンを選択します。インストールプロセス中に適切なインストールディレクトリと文字セットを選択します。ルートユーザーパスワードを設定し、適切に保ちます。テストのためにデータベースに接続します。 Windows 7の互換性とセキュリティの問題に注意してください。サポートされているオペレーティングシステムにアップグレードすることをお勧めします。

INNODBのクラスターインデックスと非クラスターインデックス(セカンダリインデックス)の違い。 INNODBのクラスターインデックスと非クラスターインデックス(セカンダリインデックス)の違い。 Apr 02, 2025 pm 06:25 PM

クラスター化されたインデックスと非クラスター化されたインデックスの違いは次のとおりです。1。クラスター化されたインデックスは、インデックス構造にデータを保存します。これは、プライマリキーと範囲でクエリするのに適しています。 2.非クラスター化されたインデックスストアは、インデックスキー値とデータの行へのポインターであり、非プリマリーキー列クエリに適しています。

人気のあるMySQL GUIツール(MySQL Workbench、PhpMyAdminなど)は何ですか? 人気のあるMySQL GUIツール(MySQL Workbench、PhpMyAdminなど)は何ですか? Mar 21, 2025 pm 06:28 PM

記事では、MySQLワークベンチやPHPMyAdminなどの人気のあるMySQL GUIツールについて説明し、初心者と上級ユーザーの機能と適合性を比較します。[159文字]

MySQLの大きなデータセットをどのように処理しますか? MySQLの大きなデータセットをどのように処理しますか? Mar 21, 2025 pm 12:15 PM

記事では、MySQLで大規模なデータセットを処理するための戦略について説明します。これには、パーティション化、シャード、インデックス作成、クエリ最適化などがあります。

MySQL:簡単な学習のためのシンプルな概念 MySQL:簡単な学習のためのシンプルな概念 Apr 10, 2025 am 09:29 AM

MySQLは、オープンソースのリレーショナルデータベース管理システムです。 1)データベースとテーブルの作成:createdatabaseおよびcreateTableコマンドを使用します。 2)基本操作:挿入、更新、削除、選択。 3)高度な操作:参加、サブクエリ、トランザクション処理。 4)デバッグスキル:構文、データ型、およびアクセス許可を確認します。 5)最適化の提案:インデックスを使用し、選択*を避け、トランザクションを使用します。

MySQLユーザーとデータベースの関係 MySQLユーザーとデータベースの関係 Apr 08, 2025 pm 07:15 PM

MySQLデータベースでは、ユーザーとデータベースの関係は、アクセス許可と表によって定義されます。ユーザーには、データベースにアクセスするためのユーザー名とパスワードがあります。許可は助成金コマンドを通じて付与され、テーブルはCreate Tableコマンドによって作成されます。ユーザーとデータベースの関係を確立するには、データベースを作成し、ユーザーを作成してから許可を付与する必要があります。

See all articles