In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to compile and install Mysql 5.5.32 with CentOS7.0", in daily operation, I believe many people have doubts on how to compile and install Mysql 5.5.32 with CentOS7.0, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "how to compile and install Mysql 5.5.32 with CentOS7.0" doubts help! Next, please follow the small series to learn together!
(1) CentOS version:
Minimum installation must have the following package groups:
yum groupinstall "Compatibility libraries" "Base" "Development tools"
yum groupinstall "debugging Tools" "Dial-up Networking Support"
Note: do not use yum delete function to delete software, it will delete related dependencies, resulting in unexpected problems.
(2) 1. Install system reassembly tool command
After installing the system, there will be some basic tools that are not installed. At this time, you can install them according to your needs. When you use them, you can also use them. For example:
yum install tree nmap sysstat lrzsz dos2unix -y
If update patch is needed, execute
yum update
# yum install ncurses-devel -y
3. Create users and groups: #useradd -s /sbin/nologin -M mysql
4. Install cmake :# ./ configure #gmake #gmake install
5. Install Mysql: # cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/mysql/tmp/mysql.sock -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=0 # make && make install
6. To configure environment variables, we need to install Mysql first. Prevent Mysql from starting. /etc/profile Add source /etc/profile Add this command to profile export PATH=/usr/local/mysql/bin/:/usr/local/mysql/scripts/:$PATH
7. Database initialization: #mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --user=mysql
8. Add the database to the boot service (this is a boot script) and then from cp a configuration file into the system configuration: #chkconfig mysqld on # cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
#cp /usr/local/mysql/support-files/my-small.cnf /etc/my.cnf
Add authorization #chmod -R 1777 /tmp # chown -R mysql.mysql /usr/local/mysql/data
Start mysql: #/etc/init.d/mysqld start
The database installation is now complete. If you fail to access the database: 1) stop the database service;2) then rm -rf /usr/local/mysql/data/ *; 3) then perform the initial steps in step 7.
Simply optimize the database:
〉select user,host from mysql.user;
〉delete from mysql.user where user='';
〉delete from mysql.user where host='::1';
〉show databases;
〉drop database test;
〉mysqladmin -u root password '123456'
13. It's done. It's ready to boot.
At this point, on "how to use CentOS 7.0 compile and install Mysql 5.5.32" learning is over, I hope to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
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.