In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the compilation and installation tutorial of mysql basic handout series, which involves things, learned from theoretical knowledge, there are many books and documents for your reference, from a practical point of view, accumulated years of practical experience can be shared with you.
One: compile mysql
Useradd-M-s / sbin/nologin mysql # create mysql user
Yum-y install cmake # install cmake
Tar zxvf mysql-5.5.22.tar.gz # decompress the mysql source code package
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DSYSCONFDIR=/etc-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all # configure mysql compilation parameters
Make # compilation
Make install # install mysql
Two: initialize mysql
Chown-R mysql:mysql / usr/local/mysql # modify mysql directory owner
Ln-s / usr/local/mysql/bin/* / usr/local/bin # create a command link
Cp / usr/local/mysql/support-files/my-medium.cnf / etc/my.cnf # copy configuration file
Cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysqld # replication startup script
Chmod + x / etc/init.d/mysqld # gives executive permission
/ usr/local/mysql/scripts/mysql_install_db-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data # initialization
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
Service mysqld start # launch mysql
Three: commonly used compilation parameters
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql # specify the installation directory
-DMYSQL_DATADIR=/usr/local/mysql/data # specify the database storage directory
-DSYSCONFDIR=/etc # specify mysql profile
-DDEFAULT_CHARSET=utf8 # uses utf8 characters
-DDEFAULT_COLLATION=utf8_general_ci # check character
-DEXTRA_CHARSETS=all # install additional code sets
-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 # allows 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
-DINSTALL_PLUGINDIR=/usr/local/mysql/plugin # plug-in file and configuration path
Read the above introduction to the compilation and installation tutorials of the mysql basic series of handouts, hoping to give you some help in practical application. Due to the limited space in this article, there will inevitably be deficiencies and areas that need to be supplemented. You can continue to pay attention to the industry information section and will update your industry news and knowledge regularly. If you need more professional answers, you can contact us on the official website for 24-hour pre-sales and after-sales to help you answer questions at any time.
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.