Installation Environment:
Ubuntu Desktop Edition 13.04
Installation version:
Mysql-5.6.12.tar.gz1.
To install the prerequisite tools:
- sudo apt-get install CMake libncurses5-Dev Bison g+ +
2 Add groups and users and install directory permissions
- sudo groupadd mysql #添加组
- sudo useradd -g MySQL MySQL -s /bin/false #创建用户mysql并加入到mysql组, Do not allow MySQL users to log in directly to the system
- sudo mkdir -p /usr/local/MySQL #创建MySQL安装目录
- sudo mkdir -p /usr/local/mysql/data #创建MySQL安装目录
- sudo chown -R mysql:mysql /usr/local/mysql/Data # Set MySQL database directory permissions
3 Compiling and installing Ysql
- CD /usr/local/src
- sudo wget http://mysql.mirror.kangaroot.net/downloads/mysql-5.6/mysql-5.6.12.tar.gz
3.1 Extracting MySQL
- sudo tar -zxvf mysql-5.6. 12.tar. GZ
3.2 Configuration Compilation
- sudo cmake-Dcmake_install_prefix=/usr/Local/Mysql-Dsysconfdir=/etc-dmysql_unix_addr=/Tmp/Mysql.Sock-Ddefault_charset=Utf8-Ddefault_collation=Utf8_general_ci-Dextra_charsets=All-Dwith_myisam_storage_engine=1 -Dwith_innobase_storage_engine=1 -dwith_memory_storage_engine= 1 -dwith_readline=< Span class= "lit" >1 -denabled_local_infile =1 -dmysql_datadir< Span class= "pun" >=/usr/local/mysql/data -dmysql_user= mysql -dwith_debug=0< Span class= "PLN" >
- sudo make -J4 #-j Digital representation with multi-core operation
- sudo make install
4. Related Settings 4.1 Configure boot start
- sudo cp ./Support-files/My-default. CNF /etc/my. Cnf
- sudo cp ./Support-files/mysql. Server /etc/init. D/mysqld #把Mysql加入系统启动
- sudo chmod 755 /etc/init. D/mysqld
- sudo chkconfig mysqld on
4.2 Common Command Soft links
- sudo ln -s /usr/local/mysql/bin/mysql /usr/ bin
- sudo ln -s /usr/local/mysql/bin/mysqladmin /usr/ bin
4.3 Initializing the database
- Sudo/Usr/local/mysql/ scripts/mysql_install_db -- basedir=/usr/local/< Span class= "PLN" >mysql --datadir=/usr/< Span class= "KWD" >local/mysql/data --skip-name- resolve --user=mysql
4.4 Modifying a configuration file
- sudo vi /etc/my. CNF
Add end of File:
- #增加默认存储类型和去掉反向解析
- Default-storage-engine=MyISAM
- Skip-name-resolve
If the server quit without updating PID file appears, follow the Create PID and Change permissions 775
Ubuntu 13.04 under compilation install MySQL