Linux下安装mysql------源码安装
# cd /usr/local/mysql/scripts/# yum -y install perl
# ll
total 36
-rwxr-xr-x. 1 root root 34558 Jan 13 16:26 mysql_install_db
# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/
Installing MySQL system tables...2016-01-13 17:24:23 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-13 17:24:23 0 /usr/local/mysql/bin/mysqld (mysqld 5.6.25) starting as process 17643 ...
2016-01-13 17:24:23 17643 InnoDB: Using atomics to ref count buffer pool pages
2016-01-13 17:24:23 17643 InnoDB: The InnoDB memory heap is disabled
2016-01-13 17:24:23 17643 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-13 17:24:23 17643 InnoDB: Memory barrier is not used
2016-01-13 17:24:23 17643 InnoDB: Compressed tables use zlib 1.2.3
2016-01-13 17:24:23 17643 InnoDB: Using CPU crc32 instructions
2016-01-13 17:24:23 17643 InnoDB: Initializing buffer pool, size = 128.0M
2016-01-13 17:24:23 17643 InnoDB: Completed initialization of buffer pool
2016-01-13 17:24:23 17643 InnoDB: Highest supported file format is Barracuda.
2016-01-13 17:24:24 17643 InnoDB: 128 rollback segment(s) are active.
2016-01-13 17:24:24 17643 InnoDB: Waiting for purge to start
2016-01-13 17:24:24 17643 InnoDB: 5.6.25 started; log sequence number 1625987
2016-01-13 17:24:27 17643 Binlog end
2016-01-13 17:24:27 17643 InnoDB: FTS optimize thread exiting.
2016-01-13 17:24:27 17643 InnoDB: Starting shutdown...
2016-01-13 17:24:29 17643 InnoDB: Shutdown completed; log sequence number 1625997
OK
Filling help tables...2016-01-13 17:24:29 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-13 17:24:29 0 /usr/local/mysql/bin/mysqld (mysqld 5.6.25) starting as process 17666 ...
2016-01-13 17:24:29 17666 InnoDB: Using atomics to ref count buffer pool pages
2016-01-13 17:24:29 17666 InnoDB: The InnoDB memory heap is disabled
2016-01-13 17:24:29 17666 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-13 17:24:29 17666 InnoDB: Memory barrier is not used
2016-01-13 17:24:29 17666 InnoDB: Compressed tables use zlib 1.2.3
2016-01-13 17:24:29 17666 InnoDB: Using CPU crc32 instructions
2016-01-13 17:24:29 17666 InnoDB: Initializing buffer pool, size = 128.0M
2016-01-13 17:24:29 17666 InnoDB: Completed initialization of buffer pool
2016-01-13 17:24:29 17666 InnoDB: Highest supported file format is Barracuda.
2016-01-13 17:24:29 17666 InnoDB: 128 rollback segment(s) are active.
2016-01-13 17:24:29 17666 InnoDB: Waiting for purge to start
2016-01-13 17:24:29 17666 InnoDB: 5.6.25 started; log sequence number 1625997
2016-01-13 17:24:29 17666 Binlog end
2016-01-13 17:24:29 17666 InnoDB: FTS optimize thread exiting.
2016-01-13 17:24:29 17666 InnoDB: Starting shutdown...
2016-01-13 17:24:31 17666 InnoDB: Shutdown completed; log sequence number 1626007
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:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/local/mysql/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 . ; /usr/local/mysql/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 at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
WARNING: Found existing config file /usr/local/mysql/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as /usr/local/mysql/my-new.cnf,
please compare it with your file and take the changes you need.
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server
页:
[1]