The following articles mainly describe how to manually install MySQL5onLinux. We will divide it into 11 parts. I hope you will gain some benefits from the manual installation of MySQL5onLinux after browsing, the specific operation content of the article is as follows. 1. One of the manual installation methods of MySQL5onLinux, download MySQL (the best combination with PHP)
The following article describes how to manually install MySQL 5 on Linux. we divide it into 11 parts, we hope that you will gain some benefits in the manual installation of MySQL 5 on Linux after browsing. The following is the specific operation content of the article. 1. MySQL 5 on Linux one of the manual installation methods, download MySQL (the best combination with PHP)
The following article describes how to manually install MySQL 5 on Linux. we divide it into 11 parts, we hope that you will gain some benefits in the manual installation of MySQL 5 on Linux after browsing. The following is the specific operation content of the article.
1. MySQL 5 on Linux manual installation method,
Download "mysql()and php )))))-standard-5.0.27-linux-i686-icc-glibc23.tar.gz". The ICC version is recommended, which is said to be 10-20% better than GCC.
2. Copy to/usr/local/and decompress:
Tar zxvf mysql(and PHP combination of character -standard-5.x...tar.gz
3. Add users and groups of MySQL (the best combination with PHP ):
Groupadd MySQL (best combination with PHP)
Useradd-g MySQL (the best combination with PHP)
4. Create a symbolic connection:
/Usr/local # ln-s MySQL (best combination with PHP)-standard-5.x... MySQL (best combination with PHP)
5. cd MySQL (the best combination with PHP). Change the current directory to/usr/local/MySQL (the best combination with PHP )/
6. initialize the database:
./Scripts/MySQL (the best combination with PHP) _ install_db -- user = MySQL (the best combination with PHP)
7. Set permissions:
/Usr/local/MySQL (the best combination with PHP) # chown-R root.
/Usr/local/MySQL (the best combination with PHP) # chown-R MySQL (the best combination with PHP) data
/Usr/local/MySQL (the best combination with PHP) # chgrp-R MySQL (the best combination with PHP)
8. Create and modify/etc/my. cnf as needed during MySQL 5 on Linux manual installation. Refer to the Configuration:
[MySQL (the best combination with PHP) d]
# Set the default value to the INNODB table and support transactions:
Default-storage-engine = INNODB
# Set the default character set:
Default-character-set = utf8
# Disable bdb:
Http://www.knowsky.com
Skip-bdb
9. Start MySQL (the best combination with PHP ):
/Usr/local/MySQL (the best combination with PHP)/bin #. /MySQL (the best combination with PHP) d_safe -- user = MySQL (the best combination with PHP )&
10. initialize the root password:
/Usr/local/MySQL (the best combination with PHP)/bin #. /MySQL (the best combination with PHP) admin-u root-p password "password-of-root"
Enter password: <输入旧口令,直接按enter>
11. log on to the root account to create a database:
/Usr/local/MySQL (the best combination with PHP) #./MySQL (the best combination with PHP)-u root-p
Enter password: password-of-root
Create a new user:
MySQL (best combination with PHP)> create user test identified by 'test-password ';
Create a new database:
MySQL (the best combination with PHP)> create database testdb;
Grant the test user the permission to access testdb from localhost:
MySQL (best combination with PHP)> grant all on testdb. * to test @ localhost;
Stop the MySQL (best combination with PHP) server:
/Usr/local/MySQL (the best combination with PHP)/bin #./MySQL (the best combination with PHP) admin-u root-p shutdown
Enter password: password-of-root
STOPPING server from pid file/usr/local/MySQL (best combination with PHP)/data/debian. pid
Xxx MySQL (best combination with PHP) d ended
The above content is an introduction to the manual Installation Method of MySQL 5 on Linux. I hope you will find some gains.