First hit me is the RPM installation, it tells me that the MySQL version of the conflict, the installation can not continue. After I use the rpm-q query, I want to delete the system with the RPM-E version (3.x.x), but the RPM and mercilessly returned a lot of other errors, due to the other software and some association, the 3.x.x can not be deleted. The good feeling of the original RPM, in this moment disappeared without a trace.
"Three-person line, there will be my teacher." "I immediately went to MSN to find Alin, when I asked him how to uninstall MySQL or upgrade with RPM, this guy would gloat to tell me that he upgraded it in 1 minutes with that Debian, and finally told me that he was" not "using RPM, and then he kept on laughing. I know ya revenge me, the last time I kept recommending that "Debian", I have not dumped him, this will give him a chance. In fact, I also think "Debian" is good, it is too harsh to read.
Since the RPM can not continue, we have to return to the second. I chose the binary installation package this time. And then find a pioneer in Google to install notes, as a reference. Then along the footsteps of the predecessors quickly walked a bit, and black and blue was bounced back, the experience of the predecessors is not suitable for me, it seems that the world did not have silver bullets.
It seems that the impatient is unable to solve the problem, simply calm down, and found a lot about MySQL installation introduction article. After many attempts, finally found a path in the thorn bushes ...
1. |
Download the MySQL installation package of binary plate from http://www.mysql.com |
This MySQL is binary sedan, do not compile |
2. |
# chmod 755 mysql-standard-5.0.15-linux-gnu-i686-glibc23.tar.gz |
// |
3. |
# tar Xfz mysql-standard-5.0.15-linux-gnu-i686-glibc23.tar.gz |
Copy the extracted directory into the/usr/local/and rename it to MySQL |
4. |
# Groupadd MySQL # useradd Mysql-g MySQL |
Set up MySQL Group Build MySQL user and add to MySQL group |
5. |
# CP/USR/LOCAL/MYSQL/SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF |
In the Support-files directory there are 4 template files, we choose one of the seats MySQL configuration file, overwriting/ETC/MY.CNF (system default configuration, which set the performance parameters and some of the MySQL path parameters) |
6. |
# Cd/usr/local/mysql #./scripts/mysql_install_db--user=mysql |
Access to MySQL Directory Initialize the table and provide access to MySQL users. Initialize the table and start setting access to MySQL and root users |
7. |
# Chown-r Root. |
Set ROOT to access/usr/local/mysql |
8. |
# chown-r MySQL Data |
Set MySQL user access to/usr/local/mysql/data, which is stored in MySQL database files. This directory is configured in/ETC/MY.CNF and generated at mysql_install_db. |
9. |
# chown-r MySQL data/. |
Set MySQL user access to all files under/usr/local/mysql/data/mysql |
10. |
# chgrp-r MySQL. |
Set up MySQL group to access/usr/local/mysql |
11. |
#/usr/local/mysql/bin/mysqld_safe--user=mysql & |
Running MySQL If there is no problem, a hint like this should appear: [1] 42264 # starting Mysqld daemon with databases From/usr/local/mysql/var If the MySQL ended such a statement, that the MySQL does not start normally, you can go to log to find the problem, log files are usually configured in/ETC/MY.CNF. Most of the problems are caused by incorrect permissions settings. |
12. |
Modify the MySQL password with the following command #/usr/local/mysql/bin/mysqladmin-u Root Password YourPassword |
The default installation password is empty and you must modify it immediately for security. |
13. |
# CP Support-files/mysql.server/etc/rc.d/init.d/mysqld # chmod 700/etc/init.d/mysqld # chkconfig--add mysqld # chkconfig--level 345 mysqld on |
Copy a script that compiles a directory Setup allows MySQL to run automatically every time it starts |
14. |
# service Mysqld Start # NETSTAT-ATLN |
Start the MYSQLD service See if Port 3306 is open. Be aware of opening the port in the firewall. |