In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following content mainly brings you the compilation and installation method of MySQL5.5, the knowledge mentioned here, which is slightly different from books, is summed up by professional and technical personnel in the process of contact with users, and has a certain value of experience sharing. I hope to bring help to the majority of readers.
Security code: it is impossible to have inner peace without a considerable degree of loneliness.
1. Test environment
Hostname IP system MySQL version MySQL-00192.168.10.23CentOS release 6.9 (Final) 5.5.56
2. Deployment
2.1 Uninstall the previous version
Rpm-qa | grep mysqlrpm-e-- nodeps mysql-libs-5.1.73-8.el6_8.x86_64
2.2 install dependent packages and cmake
Yum-y install ncurses-devel libaio-devel cmake
2.3 create users and directories
Useradd mysql-s / sbin/nologin-Mmkdir / app
2.4 compilation and installation
2.4.1 decompression
Cd / opttar zxf mysql-5.5.56.tar.gzcd mysql-5.5.56
2.4.2 compile and install
Cmake. -DCMAKE_INSTALL_PREFIX=/app/mysql-5.5.56-DMYSQL_DATADIR=/app/mysql-5.5.56/data-DMYSQL_UNIX_ADDR=/app/mysql-5.5.56/tmp/mysql.sock-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DEXTRA_CHARSETS=gbk,gb2312,utf8 Ascii-DENABLED_LOCAL_INFILE=ON-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_FEDERATED_STORAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1-DWITHOUT_PARTITION_STORAGE_ENGINE=1-DWITH_FAST_MUTEXES=1-DWITH_ZLIB=bundled-DENABLED_LOCAL_INFILE=1-DWITH_READLINE=1-DWITH_EMBEDDED_SERVER=1-DWITH_DEBUG=0make & & make install
2.4.3 create tmp directory and configuration file
Mkdir / app/mysql-5.5.56/tmpcd / app/mysql-5.5.56cp support-files/my-small.cnf / etc/my.cnfchown-R mysql.mysql / app/mysql-5.5.56chmod-R 1777 / app/mysql-5.5.56/tmp
2.4.4 initialization
Cd / app/mysql/scripts/./mysql_install_db-basedir=/app/mysql-5.5.56/-datadir=/app/mysql-5.5.56/data/-user=mysql
2.4.5 Startup script
Cp support-files/mysql.server / etc/init.d/mysqldchmod + x / etc/init.d/mysqldln-s / app/mysql-5.5.56/ app/mysqlcp / app/mysql-5.5.56/bin/* / usr/local/sbin/chkconfig-- add mysqldchkconfig mysqld on
2.4.6 configure the UTF-8 character set
Sed-I '22a default-character-set=utf8' / etc/my.cnfsed-I' 38a character-set-server=utf8' / etc/my.cnfsed-I '83a default-character-set=utf8' / etc/my.cnf
View the character set:
Mysql > show variables like 'character%' +-- +-- + | Variable_name | Value | + -- + | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | / app/mysql-5.5.56/share/charsets/ | +-- | -+-- + 8 rows in set (0.00 sec)
2.4.7 change password
Mysqladmin-uroot password
For the above compilation and installation methods of MySQL5.5, if you need to know more, you can continue to pay attention to the innovation of our industry. If you need professional answers, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.