搜索
首页数据库mysql教程Installation MariaDB5.5 on RHEL6_MySQL

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
您可以使用哪些工具来监视MySQL性能?您可以使用哪些工具来监视MySQL性能?Apr 23, 2025 am 12:21 AM

如何有效监控MySQL性能?使用mysqladmin、SHOWGLOBALSTATUS、PerconaMonitoringandManagement(PMM)和MySQLEnterpriseMonitor等工具。1.使用mysqladmin查看连接数。2.用SHOWGLOBALSTATUS查看查询数。3.PMM提供详细性能数据和图形化界面。4.MySQLEnterpriseMonitor提供丰富的监控功能和报警机制。

MySQL与SQL Server有何不同?MySQL与SQL Server有何不同?Apr 23, 2025 am 12:20 AM

MySQL和SQLServer的区别在于:1)MySQL是开源的,适用于Web和嵌入式系统,2)SQLServer是微软的商业产品,适用于企业级应用。两者在存储引擎、性能优化和应用场景上有显着差异,选择时需考虑项目规模和未来扩展性。

在哪些情况下,您可以选择SQL Server而不是MySQL?在哪些情况下,您可以选择SQL Server而不是MySQL?Apr 23, 2025 am 12:20 AM

在需要高可用性、高级安全性和良好集成性的企业级应用场景下,应选择SQLServer而不是MySQL。1)SQLServer提供企业级功能,如高可用性和高级安全性。2)它与微软生态系统如VisualStudio和PowerBI紧密集成。3)SQLServer在性能优化方面表现出色,支持内存优化表和列存储索引。

MySQL如何处理角色集和碰撞?MySQL如何处理角色集和碰撞?Apr 23, 2025 am 12:19 AM

mySqlManagesCharacterSetsetSandCollat​​ionsyutusututf-8asthEdeFault,允许ConfigurationAtdataBase,table和columnlevels,AndrequiringCarefullageLignmentToavoidMismatches.1)setDefeaultCharactersetTercharactersetEtCollacterSeteTandColletationForAdataBase.2)conformentcollecharactersettersetertersetcollat​​ertersetcollat​​ioncollat​​ion

MySQL中有什么触发器?MySQL中有什么触发器?Apr 23, 2025 am 12:11 AM

MySQL触发器是与表相关联的自动执行的存储过程,用于在特定数据操作时执行一系列操作。1)触发器定义与作用:用于数据校验、日志记录等。2)工作原理:分为BEFORE和AFTER,支持行级触发。3)使用示例:可用于记录薪资变更或更新库存。4)调试技巧:使用SHOWTRIGGERS和SHOWCREATETRIGGER命令。5)性能优化:避免复杂操作,使用索引,管理事务。

您如何在MySQL中创建和管理用户帐户?您如何在MySQL中创建和管理用户帐户?Apr 22, 2025 pm 06:05 PM

在MySQL中创建和管理用户账户的步骤如下:1.创建用户:使用CREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password';2.分配权限:使用GRANTSELECT,INSERT,UPDATEONmydatabase.TO'newuser'@'localhost';3.修正权限错误:使用REVOKEALLPRIVILEGESONmydatabase.FROM'newuser'@'localhost';然后重新分配权限;4.优化权限:使用SHOWGRA

MySQL与Oracle有何不同?MySQL与Oracle有何不同?Apr 22, 2025 pm 05:57 PM

MySQL适合快速开发和中小型应用,Oracle适合大型企业和高可用性需求。1)MySQL开源、易用,适用于Web应用和中小型企业。2)Oracle功能强大,适合大型企业和政府机构。3)MySQL支持多种存储引擎,Oracle提供丰富的企业级功能。

与其他关系数据库相比,使用MySQL的缺点是什么?与其他关系数据库相比,使用MySQL的缺点是什么?Apr 22, 2025 pm 05:49 PM

MySQL相比其他关系型数据库的劣势包括:1.性能问题:在处理大规模数据时可能遇到瓶颈,PostgreSQL在复杂查询和大数据处理上表现更优。2.扩展性:水平扩展能力不如GoogleSpanner和AmazonAurora。3.功能限制:在高级功能上不如PostgreSQL和Oracle,某些功能需要更多自定义代码和维护。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版