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--
The following is mainly to show you how to install mysql 5.6 through the compilation tool. I hope these words can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
Yum install ncurses-devel gcc gcc-c++ cmake
Download mysql by yourself
Groupadd mysql creates a mysql group
Useradd-g mysql mysql / sbin/nologin/-M creates a mysql user to join the group without letting him log in.
Verify:
Cat / etc/passwd
Cat / etc/group
Mkdir-p / usr/local/mysql5.6/mysql/data creates a library directory, installation directory, and data storage directory.
Chown-R mysql:mysql / usr/local/mysql5.6/mysql authorized mysql data
Chown-R mysql:mysql / usr/local/mysql/5.6/data
Compile:
Cmake\
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.6\ define the installation path
-DMYSQL_DATADIR=/usr/local/mysql5.6/data\ define the database path
-DMYSQL_UNIX_ADDR=/usr/local/mysql5.6/mysql.sock\ define snooping
-DDEFAULT_CHARSET=utf8\ definition character
-DDEFAULT_COLLATION=utf8_general_ci\ check character
-DWITH_INNOBASE_STORAGE_ENGINE=1\ the following four engines are installed with different database functions
-DWITH_ARCHIVE_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_MEMORY_STORAGE_ENGINE=1\
-DMYSQL_USER=mysql\ specify user
-DMYSQL_TCP_PORT=3306 designated port
-DWITH_DEBUG=0\ close DEBUG
Make & & make install
This process is still a little long, patience and so on.
Make a startup script package for mysql, which is actually CP,
Take my path as an example:
Cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysqld
Chmod + x / etc/init.d/mysqld gives execution permission
Chkconfig-- level 35 mysqld on enable startup list level 35
Initialize the database below:
/ usr/loca/mysql/scripts/mysql_install_db-- user=mysql\
-basedir=/usr/local/mysql5.6/-datadir=/usr/local.mysql5.6/data
You can see the generated files in the DATA directory
Copy the configuration file of mysql to the appropriate directory
Cp / usr/loca/mysql5.6/support-files/mysql-default-cnf / etc/init.d/my.cnf
Vim / etc/init.d/my.cnf
Port=3306
Basedir= / usr/local/mysql
Datadir= / usr/local/mysql/data
Socket= / usr/local/mysql/mysqld.sock
Log-error=/var/log/mysqld.log
Pid-file=/usr/local/mysql/data/mysqlservera.pid
Modify the parameter to the above
Finally, there are environmental variables.
Echo "export PATH=/usr/loca/mysql5.6/bin:$PATH" > > / etc/export
Service mysqld restart
View monitoring
Netstat-tulnp | grep 3306
View the process
Ps-ef | grep mysqld
Log in directly at the end of MYSQL and use the password OK!
For the above about how to install mysql 5.6 through the compilation tool, you do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.