Install MySQL in Linux
1. download the installation package (32-bit ):
MySQL-client-5.6.13-1.rhel5.i386.rpm
MySQL-server-5.6.13-1.rhel5.i386.rpm
2. Installation
Rpm-ivh MySQL-server-5.6.13-1.rhel5. I 386rpm-ivh MySQL-client-5.6.13-1.rhel5.i386
3. restart
4. run netstate-ntl to check whether Port 3306 is enabled.
5.
Mysqladmin-u root password '200'; mysql-u root-p123456
If mysql> is displayed, the installation and logon are successful!
But in step 5, there will always be errors. the error message is
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)
Solution:
/Etc/init. d/mysql stopmysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking & mysql-u root mysqlmysql> UPDATE user SET Password = PASSWORD ('newpassword ') where USER = 'root'; mysql> flush privileges; mysql> quit/etc/init. d/mysql restartmysql-u root-pnewpassword
BitsCN.com