MYSQL Study案例之--通过源码安装Mysql-5.6
# cd /usr/local/mysql# ls
bin datainclude libmysql-testscriptssql-bench
COPYINGdocsINSTALL-BINARYmanREADME share support-files
# ls -l
total 76
drwxr-xr-x2 root root4096 Jan 28 17:16 bin
-rw-r--r--1 root root 17987 Dec 142011 COPYING
drwxr-xr-x4 root root4096 Jan 28 17:16 data
drwxr-xr-x2 root root4096 Jan 28 17:16 docs
drwxr-xr-x3 root root4096 Jan 28 17:16 include
-rw-r--r--1 root root7369 Dec 142011 INSTALL-BINARY
drwxr-xr-x3 root root4096 Jan 28 17:16 lib
drwxr-xr-x4 root root4096 Jan 28 17:16 man
drwxr-xr-x 10 root root4096 Jan 28 17:16 mysql-test
-rw-r--r--1 root root2552 Dec 142011 README
drwxr-xr-x2 root root4096 Jan 28 17:16 scripts
drwxr-xr-x 27 root root4096 Jan 28 17:16 share
drwxr-xr-x4 root root4096 Jan 28 17:16 sql-bench
drwxr-xr-x2 root root4096 Jan 28 17:16 support-files
# id mysql
uid=27(mysql) gid=27(mysql) groups=27(mysql)
# chown -R mysql:mysql .
# ls -l
total 76
drwxr-xr-x2 mysql mysql4096 Jan 28 17:16 bin
-rw-r--r--1 mysql mysql 17987 Dec 142011 COPYING
drwxr-xr-x4 mysql mysql4096 Jan 28 17:16 data
drwxr-xr-x2 mysql mysql4096 Jan 28 17:16 docs
drwxr-xr-x3 mysql mysql4096 Jan 28 17:16 include
-rw-r--r--1 mysql mysql7369 Dec 142011 INSTALL-BINARY
drwxr-xr-x3 mysql mysql4096 Jan 28 17:16 lib
drwxr-xr-x4 mysql mysql4096 Jan 28 17:16 man
drwxr-xr-x 10 mysql mysql4096 Jan 28 17:16 mysql-test
-rw-r--r--1 mysql mysql2552 Dec 142011 README
drwxr-xr-x2 mysql mysql4096 Jan 28 17:16 scripts
drwxr-xr-x 27 mysql mysql4096 Jan 28 17:16 share
drwxr-xr-x4 mysql mysql4096 Jan 28 17:16 sql-bench
drwxr-xr-x2 mysql mysql4096 Jan 28 17:16 support-files
#
# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
150128 17:21:30 InnoDB: The InnoDB memory heap is disabled
150128 17:21:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150128 17:21:30 InnoDB: Compressed tables use zlib 1.2.3
150128 17:21:30 InnoDB: Using Linux native AIO
150128 17:21:30 InnoDB: CPU does not support crc32 instructions
150128 17:21:30 InnoDB: Initializing buffer pool, size = 128.0M
150128 17:21:30 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
150128 17:21:30 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
150128 17:21:31 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
150128 17:21:31 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
150128 17:21:31 InnoDB: 128 rollback segment(s) are active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
150128 17:21:31 InnoDB: Waiting for the background threads to start
......
150128 17:21:38 Shutting down plugin 'mysql_native_password'
150128 17:21:38 Shutting down plugin 'binlog'
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h rh6 password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
# chown -R mysql:mysql ./data
# chmod -R ug+rws .
# ls -l
total 76
drwsrwsr-x2 mysql mysql4096 Jan 28 17:16 bin
-rwSrwSr--1 mysql mysql 17987 Dec 142011 COPYING
drwsrwsr-x4 mysql mysql4096 Jan 28 17:16 data
drwsrwsr-x2 mysql mysql4096 Jan 28 17:16 docs
drwsrwsr-x3 mysql mysql4096 Jan 28 17:16 include
-rwSrwSr--1 mysql mysql7369 Dec 142011 INSTALL-BINARY
drwsrwsr-x3 mysql mysql4096 Jan 28 17:16 lib
drwsrwsr-x4 mysql mysql4096 Jan 28 17:16 man
drwsrwsr-x 10 mysql mysql4096 Jan 28 17:16 mysql-test
-rwSrwSr--1 mysql mysql2552 Dec 142011 README
drwsrwsr-x2 mysql mysql4096 Jan 28 17:16 scripts
drwsrwsr-x 27 mysql mysql4096 Jan 28 17:16 share
drwsrwsr-x4 mysql mysql4096 Jan 28 17:16 sql-bench
drwsrwsr-x2 mysql mysql4096 Jan 28 17:16 support-files
页:
[1]