1. Install mysql/* ubuntu Default Access system is normal user so in real work, we will get root authorization. So we need to use sudo to do all the things that only root can do. */[[email protected] ~]# cd/usr/local/src[[email protected] src]# wget http://mirrors.sohu.com/mysql/ Mysql-5.5/mysql-5.5.47-linux2.6-x86_64.tar.gz[[email protected] src]# tar zxvf mysql-5.5.47-linux2.6-x86_64. Tar.gz[[email protected] src]# MV Mysql-5.5.47-linux2.6-x86_64/usr/local/mysql[[email protected] src]# Useradd-s/sbin/nologin MySQL//build MySQL account, account used to run MySQL service [[[email protected] src]# cd/usr/local/mysql [[email  ;p rotected] mysql]# mkdir-p/data/mysql//Create DataDir, the database files will be placed here [[email protected] mysql]# chown-r mysql:mysql/ Data/mysql//Change permissions and build home directory [[email protected] mysql]#./scripts/mysql_install_db--user=mysql--datadir=/data/ MySQL//initialization [[[email protected] mysql]# CP support-files/my-large.cnf/etc/my.cnf//Copy profile [[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld//Copy startup script [[email protected] MySQL]# chmod 755/ETC/INIT.D/MYSQLD//Modify the permissions of the startup script [[email protected] mysql]# vim/etc/init.d/mysqld//Modify startup script ... Basedir =datadir=/data/mysql ... [[email protected] mysql]# chkconfig--add mysqld//Join system service Item [[email protected] mysql]# chkconfig mysqld on//Open Machine self-starter [[email protected] mysql]# service mysqld start//start mysql[[email protected] mysql]# PS aux|grep mysqld
!! The error will be generated here!!
Error encountered while initializing 1 ./bin/mysqld:error while loading shared libraries:libaio.so.1:cannot open Shared object File:directo Ry--> (root) apt-get install libaio1 (user) sudo apt-get install Libaio1
Configuring the Lamp architecture on Ubuntu