In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "the steps of Mysql-5.5.32 cmake installation". In the daily operation, I believe many people have doubts about the steps of Mysql-5.5.32 cmake installation. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "steps of Mysql-5.5.32 cmake installation". Next, please follow the editor to study!
1. Copy cmake-2.8.8.tar.gz and mysql-5.5.32.tar.gz to / opt folder
two。 Change to the opt directory
[root@mysql ~] # cd / opt
[root@mysql opt] # ls
Cmake-2.8.8.tar.gz mysql-5.5.32.tar.gz rh
3. Extract the cmake file
[root@mysql opt] # tar xf cmake-2.8.8.tar.gz
[root@mysql opt] # cd cmake-2.8.8
[root@mysql cmake-2.8.8] # ls
Bootstrap CompileFlags.cmake doxygen.config
ChangeLog.manual configure Example
ChangeLog.txt Copyright.txt Modules
CMakeCPack.cmake CTestConfig.cmake Readme.txt
CMakeCPackOptions.cmake.in CTestCustom.cmake.in Source
CMakeGraphVizOptions.cmake CTestCustom.ctest.in Templates
CMakeLists.txt DartConfig.cmake Tests
CMakeLogo.gif DartLocal.conf.in Utilities
Cmake_uninstall.cmake.in Docs
4. To install cmake
[root@mysql cmake-2.8.8] #. / configure
CMake has bootstrapped. Now run gmake.
[root@mysql cmake-2.8.8] # gmake
[root@mysql cmake-2.8.8] # gmake install
5. Add mysql users and groups
[root@mysql cmake-2.8.8] # groupadd mysql
[root@mysql cmake-2.8.8] # useradd mysql-s / sbin/nologin-M-g mysql
6.yum install ncurses-devel
[root@mysql /] # yum install ncurses-devel-y
7. Extract the mysql file
[root@mysql /] # cd / opt
[root@mysql opt] # tar xf mysql-5.5.32.tar.gz
[root@mysql opt] # cd mysql-5.5.32
[root@mysql mysql-5.5.32] # ls
BUILD CMakeLists.txt COPYING include libmysqld mysys regex sql-common tests win
BUILD-CMAKE cmd-line-utils dbug INSTALL-SOURCE libservices packaging scripts storage unittest zlib
Client config.h.cmake Docs INSTALL-WIN-SOURCE man plugin sql strings VERSION
Cmake configure.cmake extra libmysql mysql-test README sql-bench support-files vio
8. Compile mysql before installation
Cmake. -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.32\
-DMYSQL_DATADIR=/application/mysql-5.5.32/data\
-DMYSQL_UNIX_ADDR=/application/mysql-5.5.32/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\
-DWITH_FAST_MUTEXES=1\
-DWITH_ZLIB=bundled\
-DENABLED_LOCAL_INFILE=1\
-DWITH_READLINE=1\
-DWITH_EMBEDDED_SERVER=1\
-DWITH_DEBUG=0
9.mysql installation
[root@mysql mysql-5.5.32] # make & & make install
[root@mysql mysql-5.5.32] # ln-s / application/mysql-5.5.32/ / application/mysql
If an error occurs at around 63% of make:
Make [2]: * * [storage/perfschema/unittest/pfs_connect_attr-t] Error 1
Make [1]: * * [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
Then: cmake removes the-DWITH_PARTITION_STORAGE_ENGINE=1 parameter and recompiles
10. Select a profile
[root@mysql mysql-5.5.32] # cp support-files/my-small.cnf / etc/my.cnf
Cp: overwrite `/ etc/my.cnf'? Y
11. Check if there is a mysql/data directory
[root@mysql mysql-5.5.32] # ll / application/mysql/data/
Total 4
Drwxr-xr-x. 2 root root 4096 Aug 15 15:38 test
twelve。 Related authorization
[root@mysql mysql-5.5.32] # chown-R mysql.mysql / application/mysql/data/
[root@mysql mysql-5.5.32] # chmod-R 1777 / tmp/
13. Database initialization
[root@mysql mysql-5.5.32] # cd / application/mysql/scripts/
[root@mysql scripts] # ls
Mysql_install_db
[root@mysql scripts] # cd / application/mysql/scripts/
[root@mysql scripts] # / mysql_install_db-- basedir=/application/mysql/-- datadir=/application/mysql/data/-- user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
14. Startup configuration
[root@mysql mysql] # cd / opt/mysql-5.5.32
[root@mysql mysql-5.5.32] # cp support-files/mysql.server / etc/init.d/mysqld
[root@mysql mysql-5.5.32] # chmod + x / etc/init.d/mysqld
[root@mysql mysql-5.5.32] # / etc/init.d/mysqld start
Starting MySQL.. SUCCESS!
[root@mysql mysql-5.5.32] # netstat-lntup | grep 3306
Tcp 0 0 0.0.0.0 3306 0.0.0.015 * LISTEN 28462/mysqld
15. Configure environment variables
[root@mysql mysql-5.5.32] # echo 'export PATH=/application/mysql/bin:$PATH' > > / etc/profile
[root@mysql mysql-5.5.32] # tail-1 / etc/profile
Export PATH=/application/mysql/bin:$PATH
[root@mysql mysql-5.5.32] # source / etc/profile
[root@mysql mysql-5.5.32] # echo $PATH
/ application/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
16. Log in to mysql and delete the useless configuration
[root@mysql mysql-5.5.32] # mysql
Mysql > delete from mysql.user where user=''
Mysql > delete from mysql.user where host='mysql'
Mysql > delete from mysql.user where host='::1'
Mysql > select user,host from mysql.user
+-+ +
| | user | host |
+-+ +
| | root | 127.0.0.1 | |
| | root | localhost |
+-+ +
Mysql > drop database test
17. Configure login password
[root@mysql mysql-5.5.32] # / application/mysql//bin/mysqladmin-u root password 'cancer'
18. Set mysql to boot
[root@mysql mysql-5.5.32] # chkconfig mysqld on
[root@mysql mysql-5.5.32] # chkconfig-- list mysqld
Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
19. View system language
[root@mysql mysql-5.5.32] # cat / etc/sysconfig/i18n
LANG= "en_US.UTF-8"
SYSFONT= "latarcyrheb-sun16"
At this point, the study on the "steps to install Mysql-5.5.32 cmake" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.