Uninstalling and installing MySQL in Centos _ MySQL

Source: Internet
Author: User
Uninstall MySQL in Centos and install CentOSmysql

BitsCN.com
The partition table function of MySQL is only supported since 5.1. if MySQL of Centos is 5.0, you need to uninstall MySQL and install MySQL 5.1.
The following are records of operations, errors, and solutions: 1. disable the current mysql service/etc/init. d/mysqld stop2. ensure that the ps-ef | grep mysql is disabled normally. query the mysql installation status: delete the column from rpm-qa | grep mysql. Rpm-e if the mysql-server.x86_64 reports more than one, use -- allmatches to delete all of them 4. download rpm-ivh mysql-server and client5from mysql5.5 to start the new mysql/etc/init. d/mysql start6. try to access mysql-uroot-p. I have no password by default and can access it normally. however, the previous php application cannot be used, and cannot load mysql extension is reported. please check your php configuration is because you just deleted php-mysql. In fact, it should not be deleted. 8. reinstall php-mysql. my system is centos5.3 and php is 5. 1. the dependent php-mysql is installed for 5.1.yum, and the following error is reported: libmysqlclient. so.15 () (64bit) is needed libmysqlclient. so.15 (libmysqlclient_15) (64bit) is needed php-common is needed libmysqlclient. so is included in mysql-share, but it is not feasible to directly install mysql-share of mysql 5.5, because libmysqlclient is not available in this version. so.15, both above 15. to http://dev.mysql.com/downloads/mysql/5.1.html#downloads Download (MySQL-shared-compat-5.1.62-1.rhel5.i386.rpm) and then install, but because I support installing mysql-share 5.5, there will be a conflict, that is, the rpm installation cannot overwrite the previous, use the item -- force override. Rpm-ivh php-common-VERSION php-mysql-VERSION is successfully installed. 9. an error occurred while setting remote Access to the database of another node. Access denied for user 'root' @ 'localhost '. For solutions, see: http:///database/201204/128445.html When the MySQL Node executes the GRANT command to authorize the SPIDER server, the following error occurs: mysql> grant all on *. * TO 'Spider '@ 'spiderdb' identified by 'Spider'; ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO) however, I log on as a root user, and the root password is empty. how can this error be reported. If the same error occurs on the Internet, it is a solution to logon without MySQL. If you forget the password, use the following method: #/etc/init. d/mysql stop # mysqld_safe-u mysql -- skip-grant-tables -- skip-networking & # mysql-u mysql> UPDATE user SET Password = PASSWORD ('newpassword ') where USER = 'root'; mysql> flush privileges; mysql> exit #/etc/init. d/mysqld restart # mysql-uroot-pnewpassword, but this method cannot solve my problem. There is another way to delete the user online. if the value of user is NULL (delete from user where user is NULL), or update NULL to test (update user set user = 'test' where user is NULL ). But it is not easy to use. Occasionally, it is no problem to authorize a single database. Is it because root does not have the permission for a specific database? A script is written to execute "grant all on $ database. * TO 'root' @ 'localhost' identified by 'CPS-pt' with grant option; ", an error occurred when information_schema was used. When comrade dump/restore was executed two days ago, DB had been killed, and information_schema was damaged. This seems to be a bug in MySQL restore. Author kangquan2008bitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.