Ubuntu13.10编译安装MySQL5.6_MySQL
Ubuntu
1.下载MySQL5.6源码包
2.解压 tar -zxvf mysql*****.tar.gz 压缩包与tar后的文件不要放在一个目录中
cp -vRp mysql*** /usr/local/mysql
4.添加mysql组 groupadd mysql
5.添加mysql用户 useradd -r -g mysql mysql
sudo apt-get install build-essential gcc g++ libncurses5-dev
sudo apt-get install Bison
如果需要重新cmake,则需要删除之前生产的CMakeCache.txt
cmake
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql /
-DMYSQL_DATADIR=/usr/local/mysql/data /
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock /
-DDEFAULT_CHARSET=utf8 /
-DDEFAULT_COLLATION=utf8_general_ci /
-DEXTRA_CHARSETS=all
-DWITH_MYISAM_STORAGE_ENGINE=1 /
-DWITH_INNOBASE_STORAGE_ENGINE=1 /
-DENABLED_LOCAL_INFILE=1 /
-DENABLE_DOWNLOADS=1
9.make
10.make install
11.设置MySQL安装目录权限 chown -R mysql:mysql /usr/local/mysql
12.查看scripts/mysql_install_db的权限 ls -l scripts/mysql_install_db
如果没有x权限,则 chmod +x /usr/local/mysql/scripts/mysql_install_db
13.初始化MySQL scripts/mysql_install_db --user=mysql
14.复制权限文件 cp support-files/mysql.server /etc/init.d/mysqld
15.重命名权限文件 mv /etc/init.d/mysqld/mysql.server /etc/init.d/mysqld/mysqld.server
16.修改MySQL安装目录权限 chown -R root /usr/local/mysql
17.修改mysql/data目录权限 chown -R mysql /usr/local/mysql/data
18.启动MySQL bin/mysqld_safe --user=mysql &
19.进入mysql bin/mysql -u root
20.给root用户添加密码 bin/mysqladmin -u root password 'root'
21.复制my.cnf配置文件 cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.
