In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Below I will give you a brief introduction to the detailed steps of compiling and installing MySQL. Have you learned about similar topics before? If you are interested, let's take a look at this article. I believe it is more or less helpful to read the detailed steps of compiling and installing MySQL.
Compile and install mysql:
1. Preparatory work
Rpm-e mysql-- nodeps / / Uninstall mysql installed by rpm
Yum-y install ncurses-devel-5.7-3.20090208.el6.x86_64 / / install plug-ins that need to be called when compiling mysql
Userdel-r mysql / / Delete mysql user
Group-g 27 mysql / / create mysql group
Useradd-M-u 27-G 27-s / sbin/nologin mysql / / create a mysql user and join the mysql group, using the
2. Compile and install
Tools used when compiling and installing cmake: / / configuring mysql
Tar zxvf cmake-2.8.6.tar.gz-C / usr/src/ decompress
Cd / usr/src/cmake-2.8.6/ enter the program directory
. / configure & & gmake & & gmake install / / configuration compilation installation
Compile and install mysql
Tar zxvf mysql-5.5.22.tar.gz-C / usr/src/ decompress
Cd mysql-5.5.22 / / enter the program directory
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DSYSCONFDIR=/etc-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all / / configure installation parameters
Make & & make install / / compile and install
3. Start mysql
Ln-s / usr/local/mysql/bin/* / usr/local/bin / / links the mysql command to the environment variable
Cp-p / usr/local/mysql/support-files/my-medium.cnf / etc/mysql.cnf / / copy the configuration file to the specified directory
Cp-p / usr/local/mysql/support-files/mysql.server / etc/init.d/mysqld / / make startup script
Chkconfig-- add mysqld / / added as a system service
Chkconfig mysql on / / enable the default startup level
Chmod + x / usr/local/mysql/scripts/mysql_install_db / / Grant initialization script execution permission
/ usr/local/mysql/scripts/mysql_install_db-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data / / initialize mysql
Service mysqld start / / start the mysql service
Netstat-anpt | grep 3306 / / check whether the mysql service is started
Initialization parameter description:
-- user: the program user who specifies the mysql
-- basedi: specify the home directory of mysql
-- datadir: specify the database directory of mysql
4. Compilation parameters
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql / / installation directory
-DMYSQL_DATADIR=/usr/local/mysql/data / / database storage directory
-DSYSCONFDIR=/etc / / mysql configuration file
-DDEFAULT_CHARSET=utf8 / / use utf8 characters
-DDEFAULT_COLLATION=utf8_general_ci / / check character
-DEXTRA_CHARSETS=all / / install additional code sets
Other parameters
-DWITH_MYISAM_STORAGE_ENGINE=1 / / install the myisam storage engine
-DWITH_INNOBASE_STORAGE_ENGINE=1 / / install the innodb storage engine
-DWITH_ARCHIVE_STORAGE_ENGINE=1 / / install the archive storage engine
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 / / install the blackhole storage engine
-DENABLED_LOCAL_INFILE=1 / / allow data to be imported locally
-DMYSQL_TCP_PORT=3306 / / MySQL listening port
-DMYSQL_USER=mysql / / MySQL user name
-DWITH_SSL=yes / / SSL
-DWITH_MEMORY_STORAGE_ENGINE=1 / / install the memory storage engine
-DWITH_FEDERATED_STORAGE_ENGINE=1 / / install the frderated storage engine
-DWITH_PARTITION_STORAGE_ENGINE=1 / / install database partition
-DINSTALL_PLUGINDIR=/usr/local/mysql/plugin / / plug-in file and configuration path
What do you think of the detailed steps of compiling and installing MySQL? what do you think of this article? If you want to know more about it, you can continue to follow our industry information section.
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.