Tagged with: Data default IMA-Data local Linux installation tar.gz MYSQ star
Download MySQL compiled binary installation package to MySQL website.
Unzip the 32-bit installation package:
Go to the directory where the installation package is located, execute the command: Tar mysql-5.6.17-linux-glibc2.5-i686.tar.gz
Copy the extracted MySQL directory to the local software directory of the system:
Execute command: CP mysql-5.6.17-linux-glibc2.5-i686/usr/local/mysql-r
Note: The end of the directory does not add/
Add system MySQL Group and MySQL User:
Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL
To install the database:
Go to install MySQL software directory: Execute command cd/usr/local/mysql
Modify current directory owner for MySQL User: Execute command chown-r mysql:mysql.
Install database: Executes the command./scripts/mysql_install_db--user=mysql
Modify the current directory owner as root User: Execute command chown-r root:root.
Modify the current data directory owner for MySQL User: Execute command chown-r mysql:mysql data
To this database installation is complete
Start the MySQL service and add the boot MySQL service:
Add Boot: Execute command CP Support-files/mysql.server/etc/init.d/mysql, put startup script into boot initialization directory
Start MySQL service: Execute command service MySQL start
Execute command: ps-ef|grep mysql see MySQL service description started successfully,
To modify the root user password of MySQL, the root initial password is empty:
Execute command:./bin/mysqladmin-u root password ' password '
Put the MySQL client on the default path:
Ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql
Note: It is recommended to use the soft chain in the past, do not directly package file copy, easy to install multiple versions of MySQL system
Original link: https://jingyan.baidu.com/article/a378c9609eb652b3282830fd.html
Linux installation MySQL Database