I. Mysql introduction
MySQL is an open-source small-scale associated database management system. The developer is MySQL AB in Sweden. MySQL is widely used in small and medium websites on the Internet. Because of its small size, fast speed, and low total cost of ownership, especially the open source code, many small and medium websites have chosen MySQL as their website database to reduce their total cost of ownership.
II. Installation and configuration
1. Download the mysql5.1 file
Wget http://cdn.mysql.com/Downloads/MySQL-5.1/mysql-5.1.72.tar.gz
2. Add mysql-Related Users and Groups
Groupadd mysql
Useradd-g mysql
3. Unzip the installation package
Tar-zxvf mysql-5.1.72.tar.gz
4. Compile parameters
./Configure -- prefix =/usr/local/mysql/-- with-extra-charsets = big5, ascii, gb2312, gbk, utf8, latin1 -- with-mysqld-user = mysql
// You can adjust the compilation parameters by yourself./configure -- help to view the compiled parameter options, or view the installed compilation parameters.
5. Compile and install
Make & make install
6. Copy the configuration file
Cp support-files/my-medium.cnf/etc/my. cnf // Copy my. cnf configuration file
Cp support-files/mysql. server/etc/init. d/mysqld // Copy and start the mysqld file
7. Set permissions
Cd/usr/local/mysql
Chown-R mysql. mysql.
8. Create a table allowed by Mysql
/Usr/local/mysql/bin/mysql_install_db -- user = mysql
9. Set mysql startup
Chmod a + x/etc/init. d/mysqld
Chkconfig mysqld on
10. Set the mysql root password
Service mysqld start
/Usr/local/mysql/bin/mysqladmin-uroot password 'password'
11. mysql is successfully installed and mysql software can be used normally.
III. Installation problems:
Question 1:
Error in./configure: error: No curses/termcap library found?
Solution:
Yum-y install ncurses-devel
Then re-compile./configure
Tip 1:
The above/usr/local/mysql is just my installation path and can be replaced