Today, leader requires compiler installed mysql-free production environment, so only below. Directory has been involved in the processing, we needed to change it yourself!
1 Free download mysql-compiled packages:
2 Set the mysql directory:
tar -zxvf mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.6.14-linux-glibc2.5-x86_64 / usr / local / mysql
useradd -g mysql -M mysql
mkdir -p / work / mysql / data
chown -R mysql.mysql / work / mysql / data
3 Initialize the MySQL database:
# Tip: Run the following command before the system does not confirm the initial installation mysql /etc/my.cnf
/ Usr / local / mysql / scripts / mysql_install_db --basedir = / usr / local / mysql --datadir = / work / mysql / data --user = mysql
4 Add mysqld become a system service and set from the start:
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
5 Start mysql:
/ Usr / local / mysql / bin / mysqladmin -u root password 'your password'
About 7 my.cnf:
mysqld-5.5 or later my.cnf this document at the time of the initialization, will be automatically installed to /usr/local/mysql/my.cnf. And major changes inside the configuration options
Fatal error: Can not open and lock privilege tables: Table 'mysql.user' does not exist
This issue is the need to re-initialize the mysql database
mysql_install_db --basedir = / usr / local / mysql --datadir = / work / mysql / data --user = mysql
9 About my my.cnf:
# For advice on how to change settings please see
# Remove leading # and set to the amount of RAM for the most important data
# Cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# Changes to the binary log between backups.
# These are commonly set, remove the # and set as required.
basedir = / usr / local / mysql
datadir = / work / mysql / data
port = 3306
# Server_id = .....
socket = /tmp/mysql.sock
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
sql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
ps: according to the contents of the above can be made into a key installation script themselves. So I do not like before a long wait.