I checked the Android source code in UbuntuLinux today. There is not much space in the root directory. So I want to unload MySQL and install it where I want to install it, so I started to get MySQL again (it seems that it violates my original intention ^_^ ), in addition, my mentor is working on databases, and I want to write a small database with my tutor next semester. So I simply switched to today's goal. See http://www.l for installation of MySQL5.5.25 under Ubuntu12.04
I checked the Android source code in Ubuntu Linux today. There is not much space in the root directory. So I want to unload MySQL and install it where I want to install it, so I started to get MySQL again (it seems that it violates my original intention ^_^ ), in addition, my mentor is working on databases, and I want to write a small database with my tutor next semester. So I simply switched to today's goal.
References:Install MySQL 5.5.25 in Ubuntu 12.04See http://www.linuxidc.com/Linux/2012-06/62458.htm
1. Of course, you must first go to the next source code on the official website: http://www.mysql.com/downloads/mysql/?downloads=is the source code.
2. then install cmake
> Sudo apt-get insall cmake
3. Create a mysql user group and a mysql user
> Groupadd mysql
> Useradd-r-g mysql
The preceding two commands must be used with user permissions.
4. decompress the source code package
> Tar-zvxf mysql-5.5.25a.tar.gz
5. Enter the extract directory
> Cd mysql-5.5.25a
6. Use cmake to generate Makefile
> Cmake-DCMAKE_INSTALL_PREFIX =/home/killa/mysql-DMYSQL_UNIX_ADDR =/home/killa/data/mysql. sock-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk-cores = 1-cores = 1-cores = 1-DWITH_READLINE = 1-DENABLED_LOCAL_INFILE = 1-DMYSQL_DATADIR =/home/killa/data/mysql-DMYSQL_USER = mysql-DMYSQL_TCP_PORT = 3306
CMAKE_INSTALL_PREFIX: Specifies the installation directory of the MySQL program. The default value is/usr/local/mysql.
DEFAULT_CHARSET: Specifies the default Character Set of the server. The default value is latin1.
DEFAULT_COLLATION: Specifies the default server verification rules. The default value is latin1_general_ci.
ENABLED_LOCAL_INFILE: Specifies whether local load data infile execution is allowed. The default value is OFF.
WITH_COMMENT: Specifies the compilation remarks.
WITH_xxx_STORAGE_ENGINE: it specifies the storage engine for static compilation to mysql. By default, four engines, MyISAM, MERGE, MEMBER, and CSV, are compiled to the server, and do not need to be specified.
WITHOUT_xxx_STORAGE_ENGINE: Specifies the storage engine that is not compiled.
SYSCONFDIR: directory of the initialization parameter file
MYSQL_DATADIR: data file directory
MYSQL_TCP_PORT: Service port number. The default value is 3306.
MYSQL_UNIX_ADDR: socket file path. Default Value:/tmp/mysql. sock