Installation and basic Management methods of MYSQL under Linux
This article mainly introduces "MYSQL installation and basic management methods under Linux". In daily operation, I believe many people have doubts about MYSQL installation and basic management methods under Linux. Xiaobian consulted all kinds of information and sorted out simple and easy to use operation methods. I hope to answer your doubts about "MYSQL installation and basic management methods under Linux"! Next, please follow the small series to learn together!
MYSQL installation and basic management under Linux
Install some of the necessary Linux packages:
[plain]
yum install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* libevent
Install mysql, mysql installation package needs to own, install directory/usr/local/web/
[plain]
sudo mkdir -p /usr/local/web/
sudo tar xzvf mysql-5.1.39.tar.gz
cd mysql-5.1.39 www.2cto.com
./ configure --prefix=/usr/local/web/mysql.5.1.39 --enable-thread-safe-client --enable-assembler --with-big-tables --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=complex
make
make install
Create mysql user groups and other information
[plain]
sudo groupadd mysql
sudo useradd -g mysql -s /sbin/nologin mysql
sudo ./ scripts/mysql_install_db --user=mysql --datadir=/usr/local/web/mysql.5.1.39/var www.2cto.com
sudo chown -R root /usr/local/web/mysql.5.1.39
sudo chown -R mysql:mysql /usr/local/web/mysql.5.1.39/var
administration MySQL
[plain]
#Start mysql:
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server start
#restart mysql
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server restart
Stop thinking
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server stop
At this point, about "MYSQL installation and basic management methods under Linux" learning is over, I hope to solve everyone's doubts. Theory and practice can better match to help you 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!