1. Unzip the tar mysql-5.6.17-linux-glibc2.5-i686.tar.gz
2. Move the extracted files to/usr/local/mysql cp-r Mysql-5.6.17-linux-glibc2.5-i686/usr/local/mysql
3. Add system MySQL Group and MySQL User: Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL
4. Install the database:
1). Modify the current directory owner for the MySQL User: Execute command chown-r mysql:mysql.
2). Install database: Execute command./scripts/mysql_install_db--user=mysql
Problems that may occur:
-bash:./scripts/mysql_install_db:/usr/bin/perl:bad interpreter:no such file or directory
Prompt for annotative error, no/usr/bin/perl file or archive, workaround (Install Perl and Perl-devel): Execute yum-y install perl perl-devel
Can ' t locate data/dumper.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/l
Ib64/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/perl5.) At./scripts/mysql_install_db Line 42.
Workaround:yum-y Install autoconf
3) Modify the current directory owner as root User: Execute command chown-r root:root.
4) Modify the current data directory owner for MySQL User: Execute command chown-r mysql:mysql data
To this database installation is complete
Starting MySQL ... The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).
2 reasons
No permission table initialized
3 Solutions
#cd/usr/local/mysql (go to MySQL installation directory)
#chown-R mysql.mysql.
#su-mysql
$CD Server
$scripts/mysql_install_db
4 I solve the process
[Email protected] ~]# cd/usr/local/mysql
[Email protected] mysql]# chown-rmysql.mysql.
[Email protected] mysql]# su-mysql
[Email protected] ~]$ cd/usr/local/mysql
[Email protected] mysql]$scripts/mysql_install_db
Installing Mysqlsystem Tables ...
Ok
Filling Help Tables ...
Ok
To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system
REMEMBER to SET A PASSWORD for the MySQL root user!
To does so, start the server, then issue the following commands:
./bin/mysqladmin-u root password ' new-password '
./bin/mysqladmin-u root-h localhost.localdomain password ' new-password '
Alternatively you can run:
./bin/mysql_secure_installation
Which would 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
Problems with the./bin/mysqlbug script!
[Email protected] mysql]$/usr/local/mysql/bin/mysqld_safe--user=mysql&
[1] 11767
[Email protected] mysql]$ 120502 07:01:17 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err '.
120502 07:01:17 Mysqld_safe starting mysqld daemon with Databasesfrom/usr/local/mysql/data
[Email protected] mysql]$/etc/rc.d/init.d/mysql Status
MySQL running (11830) [OK]
[Email protected] mysql]$/etc/rc.d/init.d/mysql Start
Startingmysql [OK]
To use the root user from any host, password: youpassword (your root password) to connect to the MySQL server:
# mysql-u Root-proot
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;
After the operation, remember to perform the following command refresh permissions
FLUSH Privileges
Centos7.2_x64 installation mysql.tar.gz