first, easy installation
#yum install-y mysql-server MySQL mysql-devel
If the installation package conflict is reported:
File/usr/share/mysql/ukrainian/errmsg.sys from install of mysql-server-5.5.18-1.rhel5.i386 conflicts with file from Package mysql-libs-5.0.46-1.rhel5.i386
Uninstall the installation package.
#yum-y remove mysql-libs-5.0.46-1.rhel5.i386-y means no need to ask if remove
After uninstalling, install MySQL successfully
Second, manual installation
1. Upload the installation package first
/OPT/MYSQL-SERVER-4.0.16-0.I386.RPM/OPT/MYSQL-CLIENT-4.0.16-0.I386.RPM (subject to availability, not necessarily installed)
2. Add Execute permission to file
#cd/opt/Switch to the development directory
#chmod a+x mysql-server-4.0.16-0.i386.rpm To add execution permissions to a file
3. Perform the installation
#rpm-IVH mysql-server-4.0.16-0.i386.rpm
If the installation process reports the following error: File/usr/share/mysql/charsets/cp1251.xml from install of mysql-server-5.5.24-1.el6.i686 conflicts with File from package Mysql-libs-5.1.52-1.el6_0.1.i686file/usr/share/mysql/czech/errmsg.sys from install of mysql-server-5.5.24-1.el6.i686 conflicts with file from the package mysql-libs-5.1.52-1.el6_0.1.i686
The cause is caused by a packet conflict! The operating system comes with some packages that conflict with the MySQL package, first removing the conflicting libs package, and installing
#yum-y remove mysql-libs-5.1.52*-y means no need to ask if remove
after the uninstallation is complete,if the following error is reported:
Error:failed dependencies:libc.so.6 is needed by mysql-server-community-5.1.63-1.rhel4.i386 libc.so.6 (GLIB c_2.0) is needed by mysql-server-community-5.1.63-1.rhel4.i386 libc.so.6 (glibc_2.1) was needed by Mysql-server-commu Nity-5.1.63-1.rhel4.i386
If a related package is missing, the installation of the relevant package is possible, as follows:
#yum Install libc.so.6
Perform the installation of MySQL again:
#rpm-IVH mysql-server-4.0.16-0.i386.rpm
third, set the root password
Newly installed MySQL, default user root no password, need to set password
#/usr/bin/mysqladmin-u root-p ' 123456 '
If an error is displayed, the display does not have permission to connect Mysqladmin:connect to server at ' localhost ' failederror: ' Access denied for user ' root ' @ ' localhost ' (using P Assword:yes) '
Workaround:
Close the database first #service mysqld stop
Start with a no-check-safe method # Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
Login #mysql-u root MySQL again
Change Password # UPDATE user SET Password=password (' NewPassword ') where user= ' root ' and host= ' root ' or host= ' localhost '; #FLUSH privi Leges;
Restart Mysql#service mysqld restart or #ps–aux | grep mysqld command to find the MySQL process number and then execute the kill-9 process number to kill the MySQL process
four, authorized remote user login
New installation of MySQL, the default is only native to log on, other computers through the network login need to authorize
First login #/usr/bin/mysql-uroot-p
Re-authorize #grant all on * * to [email protected] '% ' identified by ' 123456 '; #flush privileges;
Well, at this point, MySQL is basically ready to use.
Five, the pit Daddy thing
Once on a machine to install MySQL, installed everything is normal, you can log on the server with the command line, but there is no MySQL this library, tried various methods, re-installed many times, are unsuccessful. The temporary solution is to go to the other normal database to lead a copy of the MySQL library, manually created, to normal use, observed for one months, there is no problem. I don't know why the MySQL library hasn't been built yet.
Install MySQL under Linux